OpenSCADAWiki: Home Page En/Doc/F Lib Math ...

Home | Каталог | Изменения | Комментарии | Пользователи | Регистрация | Вход  Пароль:  

The module <FLibMath> of the subsystem "Specials"

Module: FLibMath
Name: Math function's lib
Type: Specials
Version: 0.6
Author: Roman Savochenko, Maxim Lysenko (2009-2010)
Description: Provides the library of standard mathematical functions.
License: GPL



Special FLibMath module provides the library of standard mathematical functions into the system.

To address the functions of the library you can use static call address "Special.FLibMath.{Func}()" or dynamic "SYS.Special.FLibMath["{Func}"].call()", "SYS.Special.FLibMath.{Func}()". Where {Func} — function identifier in the library.

1. Functions

Table 1 provides a description of each function of the library. For each function the evaluation time of execution is measured. The measurement was made on a system with the following parameters: Athlon 64 3000 + (ALTLinux 3.0 (32bit)), by measuring the total time of execution of the function, while calling it 1000 times.

Table 1: The functions of the library of standard mathematical functions

IdNameDescriptionTime (micro-seconds)
absModuleMath. function — the number module.81
acosAnti-cosineMath. function — anti-cosine.149
asinAnti-sineMath. function — anti-sine.140
atanAnti-tangentMath. function — anti-tangent.109
ceilRounding up to a largerMath. function — rounding up to a larger integer.96
cosСosineMath. function — cosine.93
coshHyperbolic cosineMath. function — hyperbolic cosine.121
expExponentMath. function — exponent.145
floorRounding to the lowerMath. function — rounding to the lower integer95
ifIf ConditionCondition function — "If".92
lgCommon logarithmMath. function — common logarithm.168
lnNatural logarithmMath. function — natural logarithm.185
powPowerMath. function — involution.157
randRandom numberMath. function — random number generator.147
sinSineMath. function — sine.127
sinhHyperbolic sineMath. function — hyperbolic sine.199
sqrtThe square rootMath. function — the square root.94
tanTangentMath. function — tangent.153
tanhHyperbolic tangentMath. function — hyperbolic tangent.177

2. User programming API

Some objects of the module provides functions for user's programming.

The object "Functions library" (SYS.Special.FLibMath)

The object "User function" (SYS.Special.FLibMath["funcID"])


Страницы, ссылающиеся на данную: HomePageEn/Doc

Один файл.[Показать файлы/форму]
Комментариев нет. [Показать комментарии/форму]