What happens
With #12, a Rational holds a 128-bit numerator and denominator. The kernel behind rounded_ln, rounded_log10 and rounded_exp (include/formula-cpp/detail/transcendental.hpp) still takes only arguments whose numerator and denominator fit 64 bits. It narrows them with narrow_to_int64 and refuses the rest with Overflow.
rounded_ln of 2^70 is Overflow, though 2^70 is an ordinary Rational now and its logarithm is an ordinary number.
rounded_log10 refuses the same wide arguments. The exception is a power of ten up to 10^±38, which decimal_log answers exactly before the kernel is asked.
rounded_exp refuses arguments above 44 at up to 18 places, a bound derived for 64 bits. At those places e^45 would fit in 128 bits.
This is documented in docs/expressions.md, in the rounded_transcendental.hpp comments, and in the headroom page's "What this does not decide". It is pinned by tests (ln 2^70 and exp 2^-64 refuse; ln 2^62 and exp 2^-62 answer).
Refusing is safe: a refusal is never a wrong number. But it is a limit the 128-bit change did not lift.
Expected
The kernel takes 128-bit arguments and answers everywhere its result fits the requested places. The range reduction, the series and the rounding work in widths that cover a 128-bit argument; the 256-bit integers already used by the least-squares kernel are a model. rounded_exp's argument bound follows from 128 bits.
The pinned refusals then turn into pinned answers. The docs that state the 64-bit bound are updated, and the headroom page's "What this does not decide" loses its entry.
What happens
With #12, a
Rationalholds a 128-bit numerator and denominator. The kernel behindrounded_ln,rounded_log10androunded_exp(include/formula-cpp/detail/transcendental.hpp) still takes only arguments whose numerator and denominator fit 64 bits. It narrows them withnarrow_to_int64and refuses the rest withOverflow.rounded_lnof 2^70 isOverflow, though 2^70 is an ordinaryRationalnow and its logarithm is an ordinary number.rounded_log10refuses the same wide arguments. The exception is a power of ten up to 10^±38, whichdecimal_loganswers exactly before the kernel is asked.rounded_exprefuses arguments above 44 at up to 18 places, a bound derived for 64 bits. At those places e^45 would fit in 128 bits.This is documented in
docs/expressions.md, in therounded_transcendental.hppcomments, and in the headroom page's "What this does not decide". It is pinned by tests (ln 2^70andexp 2^-64refuse;ln 2^62andexp 2^-62answer).Refusing is safe: a refusal is never a wrong number. But it is a limit the 128-bit change did not lift.
Expected
The kernel takes 128-bit arguments and answers everywhere its result fits the requested places. The range reduction, the series and the rounding work in widths that cover a 128-bit argument; the 256-bit integers already used by the least-squares kernel are a model.
rounded_exp's argument bound follows from 128 bits.The pinned refusals then turn into pinned answers. The docs that state the 64-bit bound are updated, and the headroom page's "What this does not decide" loses its entry.