diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-03-30 08:48:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-03-30 08:48:48 -0700 |
commit | 06021c4b490ff237bf7ef13ab0f7bce0e5ef11be (patch) | |
tree | afb7d4fc2156df0ec3d7b23681586654be6365df /txr.1 | |
parent | e819894211d50c40ac7c7519528aa6f62940c6d2 (diff) | |
download | txr-06021c4b490ff237bf7ef13ab0f7bce0e5ef11be.tar.gz txr-06021c4b490ff237bf7ef13ab0f7bce0e5ef11be.tar.bz2 txr-06021c4b490ff237bf7ef13ab0f7bce0e5ef11be.zip |
u-d-arithmetic: proper treatment of ceil & round.
* arith.c (r_ceil_s, r_round_s): New symbol variables.
(ceildiv, roundiv): Route binary cases involving struts
directly to binary methods so the object is responsible for
the complete implementation.
(arith_init): Initialize r_ceil_s and r_round_s.
* tests/016/ud-arith.tl (numbase): Binary methods added for
ceil and round. Test cases added.
* txr.1: Descriptions for binary ceil and round methods added;
Notes about non-existence of binary methods removed from unary
ceil and round removed.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 39 |
1 files changed, 4 insertions, 35 deletions
@@ -38223,43 +38223,12 @@ arguments must be integers. .bmnl floor .bmnr r-floor floor .umv floor1 floor +.bmnl ceil +.bmnr r-ceil ceil .umv ceil1 ceil - -Note: the two-argument version of the -.code ceil -function is internally defined in terms of unary -.code - -and -.codn floor . -Therefore, there is no -.code ceil -method required for supporting structure arguments to the -.code ceil -function; however, the -.code neg -and -.code floor -methods are required. - +.bmnl round +.bmnr r-round round .umv round1 round - -Note: the two-argument version of the -.code round -function is internally defined in terms of -.codn floor , -.codn - , -.codn + , -.codn * , -.code < -and -.codn minusp . -Therefore, there is no -.code round -method required for supporting structure arguments to the -.code round -function; however, the methods corresponding to the -above functions are required. - .um sin .um cos .um tan |