Thread Links | Date Links | ||||
---|---|---|---|---|---|
Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index |
I wonder whether the operations for 'complete arithmetic'
should also be listed here. See my mail of April 17, 2013.
Ulrich Kulisch Am 28.04.2013 02:11, schrieb Richard Fateman: By my count there are 113 operators, assuming that inv and recip are the same. I use the name recip below. They are listed in the order they appear in the proposed standard except that I put divpair in at location 55. There are other possible orderings, including alphabetical, and it doesn't matter much to me. I am just suggesting this one to be definite. I hope I've included everything, and spelled right. neg add sub mul div recip sqrt fma case sqr pown pow exp exp2 exp10 log log2 log10 sin cos tan asin acos atan atan2 sinh cosh tanh asinh acosh atanh sign ceil floor trunc roundTiesToEven roundTiesToAway abs min max sqRev recipRev absRev sinRev cosRev tanRev coshRev mulRev divRev1 divRev2 powRev1 powRev2 atanRev1 atan2Rev2 divpair inf sup mid wid rad mag mig intersection convexHull isEqual containedIn less precedes isInterior strictlyLess strictlyPrecedes aredisjoint rootn expm1 exp2m1 exp10m1 logp1 log10p1 compoundm1 hypot rSqrt sinPi cosPi tanPi asinPi acosPi atanPi atan2Pi bothEmpty firstEmptysecondEmpty before meets overlaps starts containedBy finishes equal finishedBy contains startedBy overlappedBy metBy after expSlope1 expSlope2 logSlope1 logSlope2 cosSlope2 sinSlppe3 asinSlope3 atanSlope3 coshSlope2 sinhSlope3 If we attach numbers to them, the encoding could be this. (1 . neg) (2 . add) (3 . sub) (4 . mul) (5 . div) (6 . recip) (7 . sqrt) (8 . fma) (9 . case) (10 . sqr) (11 . pown) (12 . pow) (13 . exp) (14 . exp2) (15 . exp10) (16 . log) (17 . log2) (18 . log10) (19 . sin) (20 . cos) (21 . tan) (22 . asin) (23 . acos) (24 . atan) (25 . atan2) (26 . sinh) (27 . cosh) (28 . tanh) (29 . asinh) (30 . acosh) (31 . atanh) (32 . sign) (33 . ceil) (34 . floor) (35 . trunc) (36 . roundTiesToEven) (37 . roundTiesToAway) (38 . abs) (39 . min) (40 . max) (41 . sqRev) (42 . recipRev) (43 . absRev) (44 . sinRev) (45 . cosRev) (46 . tanRev) (47 . coshRev) (48 . mulRev) (49 . divRev1) (50 . divRev2) (51 . powRev1) (52 . powRev2) (53 . atanRev1) (54 . atan2Rev2) (55 . divpair) (56 . inf) (57 . sup) (58 . md) (59 . wid) (60 . rad) (61 . mag) (62 . mig) (63 . intersection) (64 . convexHull) (65 . isEqual) (66 . containedIn) (67 . less) (68 . precedes) (69 . isInterior) (70 . strictlyLess) (71 . strictlyPrecedes) (72 . aredisjoint) (73 . rootn) (74 . expm1) (75 . exp2m1) (76 . exp10m1) (77 . logp1) (78 . log10p1) (79 . compoundm1) (80 . hypot) (81 . rSqrt) (82 . sinPi) (83 . cosPi) (84 . tanPi) (85 . asinPi) (86 . acosPi) (87 . atanPi) (88 . atan2Pi) (89 . bothEmpty) (90 . firstEmptysecondEmpty) (91 . before) (92 . meets) (93 . overlaps) (94 . starts) (95 . containedBy) (96 . finishes) (97 . equal) (98 . finishedBy) (99 . contains) (100 . startedBy) (101 . overlappedBy) (102 . metBy) (103 . after) (104 . expSlope1) (105 . expSlope2) (106 . logSlope1) (107 . logSlope2) (108 . cosSlope2) (109 . sinSlope3) (110 . asinSlope3) (111 . atanSlope3) (112 . coshSlope2) (113 . sinhSlope3) a typical line in the test file for IEEE-754 binary double looks like this 50001 1 1 1 (1 -52 0x10000000000000)(1 -51 0x10000000000000)(-1 -51 0x10000000000000)(-1 -52 0x10000000000000) meaning test sequence number 50001 operation number 1 (that is, negation) number of interval inputs 1 number of interval outputs 1 inf of input 1 (1 -52 0x10000000000000) (that is (+1) * 2^(-52)* 0x10000000000000, i.e. 1.0 sup of input 1 (1 -51 0x10000000000000) (that is (+1) * 2^(-51)* 0x10000000000000, i.e. 2.0 inf of output 1 (-1 -51 0x10000000000000) (that is (-1) * 2^(-51)* 0x10000000000000, i.e. -2.0 sup of output 1 ...etc i.e. -1.0 It is possible to use decimal instead of hexadecimal numbers throughout; I've used hex only for the fraction part. An alternative to using triples inside parentheses could be any encoding that is bit-specific and covers NaN, infinities, signed zero, denormalized numbers, and can be read into (or converted into) every language for which the test suite might be of use in determining conformance to the standard. If for some reason the parentheses cause problems, they can be replaced with white space, since each number has exactly three components. Some of these functions return integers or floats or logical values, any of which can be easily encoded as intervals. Considering merely the number of edge cases needed, there seem to be a minimum of several thousand cases, without even delving into questions of accuracy. RJF -- Karlsruher Institut für Technologie (KIT) Institut für Angewandte und Numerische Mathematik D-76128 Karlsruhe, Germany Prof. Ulrich Kulisch Telefon: +49 721 608-42680 Fax: +49 721 608-46679 E-Mail: ulrich.kulisch@xxxxxxx www.kit.edu www.math.kit.edu/ianm2/~kulisch/ KIT - Universität des Landes Baden-Württemberg und nationales Großforschungszentrum in der Helmholtz-Gesellschaft |