| Math Library |
The Source Code file math.hei, located in the lib directory, is part of the package you receive when you download heitml.
We only have a few math function as of today (
Also, don't forget that there are already quite a number of heitml Built-in Numerical functions to serve your needs, so be sure to review that section of the Language Reference.
Example:
| resulting output: | |
<? abs(42)>
| 42
|
<? abs(-42)>
| 42
|
<? abs(12-42)>
| 30
|
Example:
| resulting output: | |
<? sqr(5)>
| 25
|
<? sqr(sqr(5))>
| 625
|
Example:
| resulting output: | |
<? cube(3)>
| 27
|
<? cube(sqr(2))>
| 64
|
Example:
| resulting output: | |
<? power(2,16)>
| 65536
|
<? power(cube(sqr(2)),4)>
| 16777216
|
Example:
| resulting output: | |
<? log10(-1) "Nn">
| null
|
<? log10(0) "Nn">
| null
|
<? log10(.001)>
| -3
|
<? log10(.1)>
| -1
|
<? log10(1)>
| 0
|
<? log10(10)>
| 1
|
<? log10(50)>
| 1
|
<? log10(100)>
| 2
|