Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -0,0 +1,15 @@
c-library m
s" m" add-lib
\c #include <math.h>
c-function fnextafter nextafter r r -- r
end-c-library
s" MAX-FLOAT" environment? drop fconstant MAX-FLOAT
: fstepdown ( F: r1 -- r2 )
MAX-FLOAT fnegate fnextafter ;
: fstepup ( F: r1 -- r2 )
MAX-FLOAT fnextafter ;
: savef+ ( F: r1 r2 -- r3 r4 ) \ r4 <= r1+r2 <= r3
f+ fdup fstepup fswap fstepdown ;

View file

@ -1,5 +1,5 @@
numeric digits 1000 /*defines precision to be 1000 digits. */
numeric digits 1000 /*defines precision to be 1,000 decimal digits. */
y=digits() /*sets Y to existing number of digits.*/
y=digits() /*sets Y to existing number of decimal digits.*/
numeric digits digits()+digits()%10 /*increase digits by 10%.*/
numeric digits y + y%10 /*increase the (numeric) decimal digits by 10%.*/