What steps will reproduce the problem? 1. build on Fedora 14 64-bit (make all) 2. make test
What is the expected output? What do you see instead?
Expected no failures, actually got four:
wd=$(pwd); (cd ../../fth; ${wd}/pforth_standalone -q t_corex.fth) (static) Include t_tools.fth include added 1496 bytes,38508 left. IF YOU SEE THIS THEN .( WORKED! 1234 - SHOULD LINE UP WITH NEXT LINE. 1234 TEST NULL STRING IN .( 10 9 8 7 6 5 INCORRECT RESULT: T{ : T.SAVE-INPUT SAVE-INPUT RESTORE-INPUT ; T.SAVE-INPUT }T{ 0 }T \ EXPECTED FAILURE
ABCD4321 - SHOULD LINE UP WITH NEXT LINE.
ABCD4321
65 passed, 1 failed. wd=$(pwd); (cd ../../fth; ${wd}/pforth_standalone -q t_strings.fth) (static) Include t_tools.fth include added 1496 bytes,38508 left. 36 passed, 0 failed. wd=$(pwd); (cd ../../fth; ${wd}/pforth_standalone -q t_locals.fth) (static) Include t_tools.fth include added 1496 bytes,38508 left. Test warning when no locals defined. (LOCAL) - Warning: no locals defined! 7 passed, 0 failed. wd=$(pwd); (cd ../../fth; ${wd}/pforth_standalone -q t_alloc.fth) (static) Testing ALLOCATE and FREE 10000 tests Total Avail = 40960 Please wait for test to complete... Final MAX = 40960 Original MAX = 40960 Test PASSED. wd=$(pwd); (cd ../../fth; ${wd}/pforth_standalone -q t_floats.fth) (static) Include t_tools.fth include added 1496 bytes,38508 left. T_F_SERIES failed for 85 1.844674e+19 T_F. T.SERIES final = 4.843786e+09 INCORRECT RESULT: T{ 1.0 1.3 150 t.series_f. }T{ true }T T_F_SERIES failed for 86 1.844674e+19 T_F. T.SERIES final = 6.296922e+09 INCORRECT RESULT: T{ 1.0 -1.3 150 t.series_f. }T{ true }T T_F_SERIES failed for 68 1.844674e+19 T_F. T.SERIES final = 5.107349e+09 INCORRECT RESULT: T{ 2.3456789 1.3719 150 t.series_f. }T{ true }T T_F>D T.SERIES final = 1.175126e+17 T_FS. T.SERIES final = 1.081004e+16 T_FS. T.SERIES final = 6.448631e-18 T_FE. T.SERIES final = 1.601179e+17 T_FE. T.SERIES final = 1.219607e-18 T_FE. T.SERIES final = 1.019165e+23 T_FE. T.SERIES final = 2.103802e-12 46 passed, 3 failed.
What version of the product are you using? On what operating system?
pforth_v27_20101121 Fedora 14 x86-64
Please provide any additional information below.
Comment #1
Posted on Jan 10, 2011 by Helpful CamelI can provide SSH access to an account on a Fedora 14 x86_64 system if that is of any help in debugging.
Comment #2
Posted on Jan 10, 2011 by Swift PandaThanks for reporting this. I can reproduce it on Snow Leopard Mac so no need to borrow access to your computer.
Problem seems to be in F.
Enter: 1.0e+9 f. Prints: 1000000000. GOOD
Enter: 1.0e+10 f. Prints: 3.689348e+19 BAD!
Comment #3
Posted on Apr 4, 2012 by Grumpy RhinoUsing the same version of pForth on ArchLinux x64, I have the same problem. Here is the 'make all' and 'make test' log: http://pastie.org/3724781
BTW, I'm not sure if this effects anything but I had to remove '-c89' from FULL_WARNINGS in Makefile to make it compile.
Comment #4
Posted on Aug 12, 2013 by Quick Beard>f and f>d are also broken on x86-64. This is caused by an error in the FP_DHI1 define in pfinnrfp.h, line 26.
The curtrent definition is :
define FP_DHI1 (((PF_FLOAT)0x40000000)*4.0)
FP_DHI1 should be equal to the maximum value for cell_t, plus one. This hardcoded value is correct on x86-32 but not for x86-64.
The definition below will work on all platforms:
define FP_DHI1 (((PF_FLOAT)(1L<<(sizeof(cell_t)*8-2)))*4.0)
Comment #5
Posted on Aug 13, 2013 by Swift PandaThanks Denis. That fix worked great. I checked the change into the SVN repo.
Status: Fixed
Labels:
Type-Defect
Priority-Medium