Dear all,
I'm happy to give you the first big update:
________________________________________
Lizard - Symbolic computation script language (Version 0.4.0-0005)
Contains the Lizard.dll (Windows x64 and x86), the Lizard.so (Linux x64), the Lizard.pbi, some examples for the integration in Pure Basic and a detailed documentation for
Lizard with many examples.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
With this update, only one major feature has been added, but this is impressive (in terms of implementation and the following impact):
The new version allows the use of floating point numbers of almost
any size and arbitrary precision!
With this feature, calculations like this one are now possible, where normal doubles would have their limits:
Code: Select all
In(1) := 123.456 ^ 6789
Out(1) = 1.889456296024e14199
Code: Select all
In(2) := Factorial(123456789.0)
Out(2) = 2.853513e945335859
Code: Select all
In(3) := 1.00000000000000000000000000000000000000001 + 1
Out(3) = 2.00000000000000000000000000000000000000001
In addition, the "Calculate()" function now has a required precision as a second parameter.
Constants, expressions and everything else can now be calculated as precisely as required:
Code: Select all
In(1) := Calculate(Pi, 60)
Out(1) = 3.14159265358979323846264338327950288419716939937510582097494
Code: Select all
In(2) := Calculate(Log(10), 60)
Out(2) = 2.30258509299404568401799145468436420760110148862877297603333
Code: Select all
In(3) := Calculate(2^(1/2), 60)
Out(3) = 1.41421356237309504880168872420969807856967187537694807317668
Of course, this new precision also takes into account all implemented functions and "tracks" the possible loss of precision in each operation:
Code: Select all
In(1) := x = 123456.7890123456789012345678901234567890
Out(1) = 1.234567890123456789012345678901234567890e5
In(2) := Precision(x)
Out(2) = 40.0915
Code: Select all
In(3) := Cos(x)
Out(3) = 0.0516848618965524102413372685985603
In(4) := Precision( Cos(x) )
Out(4) = 33.7128
Of course, "normal" floating point numbers are still treated as doubles in order to keep the speed advantage here.
There are also a few new functions such as:
Factorial,
Precision and a few more trigonometric functions.
So, have fun while testing these features and I will appreciate your feedback.
Edit: (2021-03-20) Download link changed to version 0.4.0-005: some bug fixes and a first version for Linux.