Forum
LN(0.5) = positive!!!!! (solved) - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: LN(0.5) = positive!!!!! (solved) (/showthread.php?tid=2561)



LN(0.5) = positive!!!!! (solved) - zarsoft - 10-07-2024

Code:
DIM r1,r2 AS FLOAT

r1 = RND

r2 = (r1)
PRINT "r1=";r2

r2 = LN(r1)
PRINT "LN(r1)=";r2



RE: LN(0.5) = positive!!!!! - boriel - 10-08-2024

Yes, the LN computation was bugged. Thanks for detecting it.
Try this new beta version and let me know if it works ok:

http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta18.tar.gz
http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta18.zip
http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta18-win32.zip
http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta18-linux64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-v1.17.3-beta18-macos.tar.gz


RE: LN(0.5) = positive!!!!! - zarsoft - 10-08-2024

Works.
Thanks.

Í used this command:

C:> ZXBC -taB Test.bas
WARNING: deprecated flag --tap (use --output-format=tap instead)

Should I use another command?


RE: LN(0.5) = positive!!!!! (solved) - boriel - 10-09-2024

You can still use the old one, but from here to 12 months, the old one will be removed.


RE: LN(0.5) = positive!!!!! (solved) - zarsoft - 10-09-2024

At
https://zxbasic.readthedocs.io/en/latest/zxb/

where is

-H HEAP_SIZE, --heap-size HEAP_SIZE
--heap-size HEAP_ADDRESS


should be

-H HEAP_SIZE, --heap-size HEAP_SIZE
--heap-address HEAP_ADDRESS


RE: LN(0.5) = positive!!!!! (solved) - boriel - 10-09-2024

Ok, I have updated the command line output
(still need to update the executable names, since zxb is now zxbc).
Also, please, better open a new thread for a different issue. This way we can close what is already done.

Also, I have created a Github Bug report form: https://github.com/boriel-basic/zxbasic/issues/new/choose