Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/cmd/4th/lib/zenferf.4th

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


\ 4tH library - FERF ZEN - Copyright 2009 J.L. Bezemer
\ You can redistribute this file and/or modify it under
\ the terms of the GNU General Public License
\ include lib/zenfloat.4th

[UNDEFINED] ferf [IF]
[UNDEFINED] >taylor [IF] include lib/zentaylr.4th [THEN]
: ferf
  2dup f0< >r 2dup fabs 186 -2 f<
  if r> drop else 2drop 1 s>f r> if fnegate then exit then
  2dup >taylor
          3 -taylor
         10 +taylor
         42 -taylor
        216 +taylor
       1320 -taylor
       9360 +taylor
      75600 -taylor
     685440 +taylor
    6894720 -taylor
   76204800 +taylor
  918086400 -taylor
  2drop 2drop
  112837916 -8 f*
;
[THEN]

\ : ferf-test
\  -2 s>f begin
\    2dup 2 s>f F< 
\  while
\    2dup 2dup f. ferf f. cr
\    5 -2 f+
\  repeat 2drop depth .
\ ; ferf-test

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].