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

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of HomePageEn/Doc/FLibMath from 2016-11-15 18:36:11..

The module <FLibMath> of the subsystem "Specials"

Module: FLibMath
Name: The library of standard mathematical functions.
Type: Specials
Source: spec_FLibMath.so
Version: 0.6.0
Author: Roman Savochenko, Maxim Lysenko (2009-2010)
Description: Provides the library of standard mathematical functions.
License: GPL


Contents

Introduction

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"])

Links

Referring pages: HomePageEn/Doc
HomePageEn/Doc/DAQ
HomePageEn/Doc/FLibMath
HomePageEn/Doc/ProgrammManual
HomePageEn/Doc/ProgrammManual/part5
HomePageEn/Using/PLC


 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]