Exact remainders; refuse numbers held rounded (closes #3)
check / check (push) Successful in 1m14s
check / check (push) Successful in 1m14s
x % y is now y times the fractional part of x/y. The old form, x minus y times the whole part of x/y, passed through a product that go/constant could hold only rounded even when both operands and the remainder were exact, and then replied 0. A number whose numerator or denominator reaches 4096 bits, which go/constant holds rounded, is now refused as too large wherever it appears, literals included. A sum of such numbers could lose the answer, and a rounded exponent near a whole number was computed as an exact power. This replaces the separate check on a negative base's exponent. Model: opus-5-5
This commit is contained in:
@@ -176,7 +176,10 @@ container.
|
||||
Whole numbers below 10<sup>21</sup> are written exactly; other results
|
||||
in the shortest form that reads back as the same double, in exponent
|
||||
notation from 10<sup>21</sup> up and below 10<sup>-6</sup>. A result
|
||||
beyond the range of a double is refused as too large.
|
||||
beyond the range of a double is refused as too large, and so is any
|
||||
number, even a small one such as `1e-1300` or one inside a longer
|
||||
expression, whose numerator or denominator reaches 4096 bits:
|
||||
`go/constant` could hold it only rounded.
|
||||
- **Failure is an exit.** If the chat client exits or the connection to
|
||||
it drops, the bot exits with an error and the container's restart
|
||||
policy starts both again. `SIGTERM` stops the bot, which stops the
|
||||
|
||||
Reference in New Issue
Block a user