Leon,
the results of tests 4-6 are from what I see quite different (+/-
19) against the correct result =31415:
> test1
31415 ok
> test2
31415 ok
> test3
31415 ok
> test4
31396 ok
> test5
31438 ok
> test6
-31434 ok
>
I think the difference is too big for a single precision float..P.
- PŮV
On Monday, August 30, 2010 04:19:55 pm pito wrote:
> The test4-6 are done with negative koef. You may see an error.
> One important thing - in order to load float lib you have to add
> the word d= into your compilation.
> Pito
I think 4-6 are getting the right results. test4 has (-1)^6=1, test5 ha
Leon,
I think there is an issue with negative numbers:
> -1 s>f fconstant _-1 define 1.0
ok
> 1 s>f fconstant _1 define -1.0
ok
> _1 _pi f* _1e4 f* f>s . 1.0 * pi * 1.0E4 = 31415
31415 ok
> _-1 _pi f* _1e4 f* f>s . > -1.0 * pi * 1.0E4 = -31426
-31426 ok
>
It ca
Leon,
Thanks! The results of the test1-6 (all results shall be equal
31415, ignoring sign):
> test1
31415 ok
> test2
31415 ok
> test3
31415 ok
> test4
31396 ok
> test5
31438 ok
> test6
-31434 ok
>
The test4-6 are done with negative koef. You may see an error.
One important thing - in order t
Ok, that bug should be fixed -- the new version of the code is up on
http://github.com/lnmaurer/amforth-float
Below are some of Pito's examples -- now working. Thanks again for catching
this.
In answer to an earlier question -- I think double length floats would be
trickier to do because there
Some errors when compiling float constants:
> 1074 s>f 2251 s>f f/ fconstant _log3
|significand| > 16777215
> 10691 s>f 462 s>f f/ fconstant _e**pi
|significand| > 16777215
> _1e-6 1000 s>f f/ fconstant _1e-9
|significand| > 16777215
P.
-
Hi, this is an update for experimenters (till we get input/output of
float numbers):
--
marker _floatconstants_
\ some float constants
355 s>f 113 s>f f/ fconstant_pi
355 s>f 226 s>f f/ fconstant_pi_half
355 s>f 452 s>f f/ fconstant
Leon,
I uploaded in other post an update of useful float constnats (these
constants are useful till we will have input and output of float
numbers).
However it freezes when uploading (e.g. when compiling _third) so it
seems the f/ is cousing a problem. Try it plz.
Pito
> That's a good way to boil