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

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


\ 4tH library - FMIN FMAX 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] f+   [IF] [ABORT] [THEN]
[UNDEFINED] fmax [IF]
: (select) if 2swap then 2drop ;
: fmin 2over 2over f< 0= (select) ;
: fmax 2over 2over f<    (select) ;

[DEFINED] 4th# [IF] hide (select) [THEN]
[THEN]

\ 1 0 1 0 fmin f. cr
\ 1 0 1 0 fmax f. cr
\ 2 0 1 0 fmin f. cr 
\ 2 0 1 0 fmax f. cr
\ 0 0 1 -99 fmin f. cr
\ 0 0 1 -99 fmax f. cr

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].