First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
7
Task/Infinity/Forth/infinity.fth
Normal file
7
Task/Infinity/Forth/infinity.fth
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
: inf ( -- f ) 1e 0e f/ ;
|
||||
inf f. \ implementation specific. GNU Forth will output "inf"
|
||||
|
||||
: inf? ( f -- ? ) s" MAX-FLOAT" environment? drop f> ;
|
||||
\ IEEE infinity is the only value for which this will return true
|
||||
|
||||
: has-inf ( -- ? ) ['] inf catch if false else inf? then ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue