^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*---------------------------------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) | poly_tan.c |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) | Compute the tan of a FPU_REG, using a polynomial approximation. |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) | Copyright (C) 1992,1993,1994,1997,1999 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) | W. Metzenthen, 22 Parker St, Ormond, Vic 3163, |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) | Australia. E-mail billm@melbpc.org.au |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) +---------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include "exception.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include "reg_constant.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include "fpu_emu.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include "fpu_system.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include "control_w.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include "poly.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define HiPOWERop 3 /* odd poly, positive terms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) static const unsigned long long oddplterm[HiPOWERop] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 0x0000000000000000LL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 0x0051a1cf08fca228LL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 0x0000000071284ff7LL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define HiPOWERon 2 /* odd poly, negative terms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) static const unsigned long long oddnegterm[HiPOWERon] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 0x1291a9a184244e80LL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 0x0000583245819c21LL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define HiPOWERep 2 /* even poly, positive terms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) static const unsigned long long evenplterm[HiPOWERep] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 0x0e848884b539e888LL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) 0x00003c7f18b887daLL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) #define HiPOWERen 2 /* even poly, negative terms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) static const unsigned long long evennegterm[HiPOWERen] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) 0xf1f0200fd51569ccLL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) 0x003afb46105c4432LL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) static const unsigned long long twothirds = 0xaaaaaaaaaaaaaaabLL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) /*--- poly_tan() ------------------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) | |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) +---------------------------------------------------------------------------*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) void poly_tan(FPU_REG *st0_ptr)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) long int exponent;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) int invert;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) Xsig argSq, argSqSq, accumulatoro, accumulatore, accum,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) argSignif, fix_up;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) unsigned long adj;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) exponent = exponent(st0_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #ifdef PARANOID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) if (signnegative(st0_ptr)) { /* Can't hack a number < 0.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) arith_invalid(0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) } /* Need a positive number */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) #endif /* PARANOID */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) /* Split the problem into two domains, smaller and larger than pi/4 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) if ((exponent == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) || ((exponent == -1) && (st0_ptr->sigh > 0xc90fdaa2))) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) /* The argument is greater than (approx) pi/4 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) invert = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) accum.lsw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) XSIG_LL(accum) = significand(st0_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) if (exponent == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) /* The argument is >= 1.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) /* Put the binary point at the left. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) XSIG_LL(accum) <<= 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) /* pi/2 in hex is: 1.921fb54442d18469 898CC51701B839A2 52049C1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) XSIG_LL(accum) = 0x921fb54442d18469LL - XSIG_LL(accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) /* This is a special case which arises due to rounding. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) if (XSIG_LL(accum) == 0xffffffffffffffffLL) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) FPU_settag0(TAG_Valid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) significand(st0_ptr) = 0x8a51e04daabda360LL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) setexponent16(st0_ptr,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) (0x41 + EXTENDED_Ebias) | SIGN_Negative);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) argSignif.lsw = accum.lsw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) XSIG_LL(argSignif) = XSIG_LL(accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) exponent = -1 + norm_Xsig(&argSignif);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) invert = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) argSignif.lsw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) XSIG_LL(accum) = XSIG_LL(argSignif) = significand(st0_ptr);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) if (exponent < -1) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) /* shift the argument right by the required places */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) if (FPU_shrx(&XSIG_LL(accum), -1 - exponent) >=
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 0x80000000U)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) XSIG_LL(accum)++; /* round up */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) XSIG_LL(argSq) = XSIG_LL(accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) argSq.lsw = accum.lsw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) mul_Xsig_Xsig(&argSq, &argSq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) XSIG_LL(argSqSq) = XSIG_LL(argSq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) argSqSq.lsw = argSq.lsw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) mul_Xsig_Xsig(&argSqSq, &argSqSq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) /* Compute the negative terms for the numerator polynomial */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) accumulatoro.msw = accumulatoro.midw = accumulatoro.lsw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) polynomial_Xsig(&accumulatoro, &XSIG_LL(argSqSq), oddnegterm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) HiPOWERon - 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) mul_Xsig_Xsig(&accumulatoro, &argSq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) negate_Xsig(&accumulatoro);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) /* Add the positive terms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) polynomial_Xsig(&accumulatoro, &XSIG_LL(argSqSq), oddplterm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) HiPOWERop - 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) /* Compute the positive terms for the denominator polynomial */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) accumulatore.msw = accumulatore.midw = accumulatore.lsw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) polynomial_Xsig(&accumulatore, &XSIG_LL(argSqSq), evenplterm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) HiPOWERep - 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) mul_Xsig_Xsig(&accumulatore, &argSq);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) negate_Xsig(&accumulatore);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) /* Add the negative terms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) polynomial_Xsig(&accumulatore, &XSIG_LL(argSqSq), evennegterm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) HiPOWERen - 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) /* Multiply by arg^2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) mul64_Xsig(&accumulatore, &XSIG_LL(argSignif));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) mul64_Xsig(&accumulatore, &XSIG_LL(argSignif));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) /* de-normalize and divide by 2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) shr_Xsig(&accumulatore, -2 * (1 + exponent) + 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) negate_Xsig(&accumulatore); /* This does 1 - accumulator */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) /* Now find the ratio. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) if (accumulatore.msw == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) /* accumulatoro must contain 1.0 here, (actually, 0) but it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) really doesn't matter what value we use because it will
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) have negligible effect in later calculations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) XSIG_LL(accum) = 0x8000000000000000LL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) accum.lsw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) } else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) div_Xsig(&accumulatoro, &accumulatore, &accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) /* Multiply by 1/3 * arg^3 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) mul64_Xsig(&accum, &XSIG_LL(argSignif));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) mul64_Xsig(&accum, &XSIG_LL(argSignif));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) mul64_Xsig(&accum, &XSIG_LL(argSignif));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) mul64_Xsig(&accum, &twothirds);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) shr_Xsig(&accum, -2 * (exponent + 1));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) /* tan(arg) = arg + accum */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) add_two_Xsig(&accum, &argSignif, &exponent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) if (invert) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) /* We now have the value of tan(pi_2 - arg) where pi_2 is an
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) approximation for pi/2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) /* The next step is to fix the answer to compensate for the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) error due to the approximation used for pi/2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) /* This is (approx) delta, the error in our approx for pi/2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) (see above). It has an exponent of -65
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) XSIG_LL(fix_up) = 0x898cc51701b839a2LL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) fix_up.lsw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) if (exponent == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) adj = 0xffffffff; /* We want approx 1.0 here, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) this is close enough. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) else if (exponent > -30) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) adj = accum.msw >> -(exponent + 1); /* tan */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) adj = mul_32_32(adj, adj); /* tan^2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) } else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) adj = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) adj = mul_32_32(0x898cc517, adj); /* delta * tan^2 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) fix_up.msw += adj;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) if (!(fix_up.msw & 0x80000000)) { /* did fix_up overflow ? */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) /* Yes, we need to add an msb */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) shr_Xsig(&fix_up, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) fix_up.msw |= 0x80000000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) shr_Xsig(&fix_up, 64 + exponent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) } else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) shr_Xsig(&fix_up, 65 + exponent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) add_two_Xsig(&accum, &fix_up, &exponent);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) /* accum now contains tan(pi/2 - arg).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) Use tan(arg) = 1.0 / tan(pi/2 - arg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) accumulatoro.lsw = accumulatoro.midw = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) accumulatoro.msw = 0x80000000;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) div_Xsig(&accumulatoro, &accum, &accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) exponent = -exponent - 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) /* Transfer the result */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) round_Xsig(&accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) FPU_settag0(TAG_Valid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) significand(st0_ptr) = XSIG_LL(accum);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) setexponent16(st0_ptr, exponent + EXTENDED_Ebias); /* Result is positive. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) }