Skip to content

Fix BigFloat precision handling and trigonometric range reduction - #792

Open
OlivierHnt wants to merge 14 commits into
JuliaIntervals:masterfrom
OlivierHnt:fix/exact-bigfloat-and-range-reduction
Open

OlivierHnt wants to merge 14 commits into
JuliaIntervals:masterfrom
OlivierHnt:fix/exact-bigfloat-and-range-reduction

Conversation

@OlivierHnt

@OlivierHnt OlivierHnt commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Some more findings by Claude... The only 'big' change is the quadrant logic used for trigonometric functions. In fact it supersedes PR #633.

Below is Claude's summary.


Follow-up to #790 / #791. One commit per fix; each commit message explains the bug and the fix.

BigFloat bounds more precise than the global precision (in the spirit of #767, option 2: results keep the precision of their inputs, as + and - already do)

  • Negation, abs, floor, ceil, trunc, round, mag, mig and ExactReal negation used Base, which rounds to nearest at the global precision. This made -x, pown, cosh, abs2, … miss the true value. They now go through an exact helper that keeps the input precision.
  • mid now computes at the precision of the bounds; before, bisect could make no progress.

Range reduction of sin, cos, tan, cot, sec, csc, sinpi, cospi
The old code tracked only the quadrant modulo 4 and relied on exact width checks and on the global precision, so intervals could come out wrong or inverted, e.g. at setprecision(BigFloat, 12). The new code computes exact integer bounds on the multiples of π/2 (or 1/2) strictly inside the interval. The result is the hull of the endpoint values and the extrema in that set, or the whole line if the set contains a pole. The commit message has the argument. Thin intervals are evaluated directly. It is as fast or faster: normal-size arguments about 35% faster, huge thin arguments about 20× faster.

Other fixes

  • cot, sec and csc now have Interval methods. Before, Base's inv(tan(x)) was one ulp wider, and gave cot([1, 2]) as the whole line decorated trv.
  • Divisions involving ExactReal{Bool} claimed exactness for inexact quotients, e.g. exact(true) / exact(3.0).
  • Complex ^: the exponent slice bounds are now rounded outward.
  • ForwardDiff extension: the derivative of x^y for a float exponent used y - 1 rounded to nearest (e.g. x^1e-20).
  • IrrationalConstants extension: constants are now computed at the target type's precision. bareinterval(Float64, c) threw a MethodError because the @generated cache, now limited to Base irrationals, could not see methods defined in the extension.

Not included: display rounding (separate work) and uncertainty parsing (#786).

🤖 Generated with Claude Code

OlivierHnt and others added 9 commits November 1, 2026 21:58
Negation, abs, floor, ceil, trunc and round are exact, but Base computes
them for BigFloat at the global precision and rounds to nearest. A bound
with more bits than the global precision then lost the enclosure, e.g.
-x for x = 1 + 2^-400 at 512 bits gave [-1, -1]. The same happened in
mag and mig, so in pown, cosh and abs2, and in the negation of ExactReal.

These operations now go through an `_exact` helper that, for BigFloat,
returns a result with the precision of the input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sin, cos, tan, cot, sec, csc, sinpi and cospi located the bounds of an
interval relative to multiples of π/2 (or 1/2) with BigFloat operations
at the global precision, and only kept the position modulo 4. The result
was correct only when π was the tightest enclosure, the interval width
checks were exact and the global precision was high enough. Otherwise
intervals came out wrong or inverted, for example sin of
[9.671908032480526e8, 9.671908055277463e8] at a BigFloat precision of
12, or cospi of 512-bit bounds near 1.

The multiples m⋅π/2 strictly inside [lo, hi] are exactly the integers m
with floor(lo/(π/2)) < m ≤ ceil(hi/(π/2)) - 1. `_quadrant` now returns
a lower bound of the first and an upper bound of the second, as exact
integers, so the computed set always contains the true one. Each
function then returns the hull of its values at lo, hi and at the
extrema in that set, or the whole line if the set contains a pole. When
the set holds no extremum or pole, the function is monotone on the
union of the pieces it covers, with the direction of the first piece.
Thin intervals are evaluated directly, and the width checks only
shortcut cases that are correct anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These functions had no Interval methods, so Base computed them as
inv(tan(x)), inv(cos(x)) and inv(sin(x)). The result was one ulp wider
than the BareInterval methods, and cot of an interval containing a pole
of tan, such as [1, 2], gave the whole line decorated trv although cot
is defined there. They now call the BareInterval methods and decorate
like tan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The division methods involving ExactReal{Bool} returned exact(x / y)
without checking that the quotient is exact. For example
exact(true) / exact(3.0), exact(true) / exact(3) and
exact(2^60 + 1) / exact(true) gave guaranteed intervals that missed the
true value. Integer divisions now go through the same exactness check as
other integer divisions, x / exact(true) returns x, and
exact(true) / y returns a plain number when y is a float.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a non-integer exponent interval, x^y splits the real part of y into
slices around integers. The bounds of the first and last slice were
computed as a - kmin and b - kmax with the operations of the bound type,
so they could be rounded inward and the result could miss part of the
range, for example with 2000-bit BigFloat bounds. They now come from
interval subtraction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The derivative of x^y for a float or irrational y used v^(y - 1), where
y - 1 is rounded to nearest. For example the derivative of x^1e-20 at 2
missed the true value. It now uses y - interval(1), like the rule for
interval exponents. Integer and rational exponents are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arget type

The extension evaluated the formula of each constant at the global
BigFloat precision, so at a low precision, e.g. setprecision(BigFloat,
20), interval(IrrationalConstants.twoπ) was a loose Float64 enclosure.
The formula is now evaluated with 64 more bits than the target type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mid used Base arithmetic, which for BigFloat works at the global
precision. With bounds more precise than that, the midpoint was rounded
back to a bound, e.g. mid([1, 1 + 2^-400]) at 512 bits was 1, so bisect
made no progress. The midpoint is now computed at the precision of the
bounds, like the other operations on intervals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bareinterval(T, a) for an irrational a is a generated function that
computes the interval once. It was defined for every AbstractIrrational,
but a generator cannot see methods defined after it, so for the
IrrationalConstants extension bareinterval(Float64, c) and
bareinterval(c) threw a MethodError, while interval(c) worked. The test
recorded the error.

The generated method is now restricted to Base irrationals, whose
rounding methods are defined in the package. Other irrationals use the
same uncached method as interval(c).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Nov 1, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.83%. Comparing base (cdf05f8) to head (4cd900b).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #792      +/-   ##
==========================================
- Coverage   94.66%   92.83%   -1.84%     
==========================================
  Files          33       33              
  Lines        3376     3335      -41     
==========================================
- Hits         3196     3096     -100     
- Misses        180      239      +59     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 4cd900b... master / 4cd900b...
BigFloat MPFI/basics/* 21.9 ± 3.8 μs 21.8 ± 4 μs 1.01 ± 0.25
BigFloat MPFI/basics/+ 12.4 ± 3.8 μs 12.5 ± 3.8 μs 0.994 ± 0.43
BigFloat MPFI/basics/- 13.4 ± 3.8 μs 13.8 ± 3.9 μs 0.967 ± 0.39
BigFloat MPFI/basics// 24.8 ± 7.8 μs 18.4 ± 4.5 μs 1.35 ± 0.54
BigFloat MPFI/basics/abs 9.77 ± 3.6 μs 9.79 ± 3.6 μs 0.998 ± 0.52
BigFloat MPFI/basics/acos 0.675 ± 0.01 ms 0.677 ± 0.0096 ms 0.998 ± 0.021
BigFloat MPFI/basics/asin 0.664 ± 0.0098 ms 0.672 ± 0.013 ms 0.988 ± 0.024
BigFloat MPFI/basics/atan 2.1 ± 0.01 ms 2.11 ± 0.008 ms 0.997 ± 0.0061
BigFloat MPFI/basics/cos 0.242 ± 0.0092 ms 0.242 ± 0.0091 ms 1 ± 0.054
BigFloat MPFI/basics/cosh 0.435 ± 0.012 ms 0.433 ± 0.012 ms 1 ± 0.04
BigFloat MPFI/basics/exp 0.513 ± 0.011 ms 0.513 ± 0.011 ms 1 ± 0.032
BigFloat MPFI/basics/inv 17 ± 3.6 μs 17.1 ± 3.7 μs 0.993 ± 0.3
BigFloat MPFI/basics/log 0.472 ± 0.011 ms 0.473 ± 0.01 ms 0.997 ± 0.032
BigFloat MPFI/basics/sin 0.346 ± 0.011 ms 0.345 ± 0.011 ms 1 ± 0.044
BigFloat MPFI/basics/sinh 0.577 ± 0.01 ms 0.575 ± 0.011 ms 1 ± 0.026
BigFloat MPFI/basics/sqrt 22.7 ± 3.9 μs 22.6 ± 3.9 μs 1 ± 0.24
BigFloat MPFI/basics/tan 0.276 ± 0.01 ms 0.276 ± 0.0097 ms 1 ± 0.051
BigFloat MPFI/basics/tanh 0.591 ± 0.01 ms 0.596 ± 0.011 ms 0.992 ± 0.025
BigFloat bareinterval/basics/* 0.0393 ± 0.0027 ms 0.0406 ± 0.0028 ms 0.967 ± 0.094
BigFloat bareinterval/basics/+ 22.7 ± 3.7 μs 23 ± 3.8 μs 0.984 ± 0.23
BigFloat bareinterval/basics/- 24 ± 3.7 μs 23.2 ± 3.8 μs 1.04 ± 0.23
BigFloat bareinterval/basics// 19.9 ± 5.5 μs 19.8 ± 5.6 μs 1.01 ± 0.4
BigFloat bareinterval/basics/abs 16 ± 3.6 μs 16.5 ± 3.7 μs 0.97 ± 0.31
BigFloat bareinterval/basics/acos 0.713 ± 0.014 ms 0.715 ± 0.013 ms 0.997 ± 0.027
BigFloat bareinterval/basics/asin 0.703 ± 0.014 ms 0.702 ± 0.014 ms 1 ± 0.028
BigFloat bareinterval/basics/atan 2.11 ± 0.009 ms 2.1 ± 0.0084 ms 1 ± 0.0059
BigFloat bareinterval/basics/cos 0.439 ± 0.1 ms 0.496 ± 0.02 ms 0.886 ± 0.21
BigFloat bareinterval/basics/cosh 0.485 ± 0.013 ms 0.485 ± 0.013 ms 1 ± 0.038
BigFloat bareinterval/basics/exp 0.514 ± 0.012 ms 0.514 ± 0.012 ms 0.999 ± 0.032
BigFloat bareinterval/basics/inv 26.8 ± 3.6 μs 27.5 ± 3.7 μs 0.974 ± 0.19
BigFloat bareinterval/basics/log 0.51 ± 0.012 ms 0.509 ± 0.012 ms 1 ± 0.034
BigFloat bareinterval/basics/sin 0.583 ± 0.1 ms 0.631 ± 0.018 ms 0.924 ± 0.17
BigFloat bareinterval/basics/sinh 0.585 ± 0.012 ms 0.586 ± 0.012 ms 0.998 ± 0.029
BigFloat bareinterval/basics/sqrt 0.0323 ± 0.0026 ms 0.0329 ± 0.0027 ms 0.984 ± 0.11
BigFloat bareinterval/basics/tan 0.342 ± 0.061 ms 0.393 ± 0.016 ms 0.871 ± 0.16
BigFloat bareinterval/basics/tanh 0.598 ± 0.012 ms 0.606 ± 0.012 ms 0.986 ± 0.027
BigFloat interval/basics/* 0.0427 ± 0.013 ms 0.0425 ± 0.0019 ms 1 ± 0.31
BigFloat interval/basics/+ 17.7 ± 9.2 μs 23.9 ± 9.2 μs 0.74 ± 0.48
BigFloat interval/basics/- 18.1 ± 0.3 μs 17.1 ± 0.31 μs 1.06 ± 0.026
BigFloat interval/basics// 20.1 ± 0.35 μs 20.4 ± 0.31 μs 0.985 ± 0.023
BigFloat interval/basics/abs 15.8 ± 8.7 μs 16.4 ± 8.1 μs 0.968 ± 0.71
BigFloat interval/basics/acos 0.706 ± 0.04 ms 0.748 ± 0.048 ms 0.943 ± 0.08
BigFloat interval/basics/asin 0.691 ± 0.01 ms 0.692 ± 0.031 ms 0.998 ± 0.047
BigFloat interval/basics/atan 2.1 ± 0.0086 ms 2.11 ± 0.0086 ms 0.994 ± 0.0058
BigFloat interval/basics/cos 0.342 ± 0.013 ms 0.408 ± 0.09 ms 0.838 ± 0.19
BigFloat interval/basics/cosh 0.469 ± 0.012 ms 0.467 ± 0.027 ms 1 ± 0.064
BigFloat interval/basics/exp 0.522 ± 0.0097 ms 0.522 ± 0.0097 ms 1 ± 0.026
BigFloat interval/basics/inv 22.2 ± 0.36 μs 22.9 ± 0.38 μs 0.973 ± 0.023
BigFloat interval/basics/log 0.504 ± 0.027 ms 0.506 ± 0.04 ms 0.997 ± 0.095
BigFloat interval/basics/sin 0.497 ± 0.014 ms 0.548 ± 0.083 ms 0.906 ± 0.14
BigFloat interval/basics/sinh 0.594 ± 0.012 ms 0.593 ± 0.011 ms 1 ± 0.027
BigFloat interval/basics/sqrt 0.0383 ± 0.011 ms 0.0391 ± 0.033 ms 0.979 ± 0.88
BigFloat interval/basics/tan 0.286 ± 0.013 ms 0.337 ± 0.013 ms 0.848 ± 0.051
BigFloat interval/basics/tanh 0.607 ± 0.01 ms 0.613 ± 0.0097 ms 0.989 ± 0.023
bareinterval/basics/* 1.65 ± 0.05 μs 1.67 ± 0.07 μs 0.988 ± 0.051
bareinterval/basics/+ 0.521 ± 0.01 μs 0.511 ± 0.02 μs 1.02 ± 0.044
bareinterval/basics/- 0.551 ± 0.01 μs 0.552 ± 0.01 μs 0.998 ± 0.026
bareinterval/basics// 1.28 ± 0.049 μs 1.27 ± 0.031 μs 1.01 ± 0.046
bareinterval/basics/abs 0.16 ± 0.001 μs 0.16 ± 0.001 μs 1 ± 0.0088
bareinterval/basics/acos 2.73 ± 0.03 μs 2.75 ± 0.04 μs 0.989 ± 0.018
bareinterval/basics/asin 3.02 ± 0.031 μs 3 ± 0.03 μs 1.01 ± 0.014
bareinterval/basics/atan 13.4 ± 0.24 μs 13.5 ± 0.24 μs 0.994 ± 0.025
bareinterval/basics/cos 0.0941 ± 0.017 ms 0.0554 ± 0.0055 ms 1.7 ± 0.35
bareinterval/basics/cosh 7.15 ± 0.03 μs 7.16 ± 0.04 μs 0.999 ± 0.007
bareinterval/basics/exp 4.23 ± 0.05 μs 4.23 ± 0.05 μs 1 ± 0.017
bareinterval/basics/inv 1.16 ± 0.05 μs 1.02 ± 0.02 μs 1.14 ± 0.054
bareinterval/basics/log 1.94 ± 0.03 μs 1.93 ± 0.03 μs 1 ± 0.022
bareinterval/basics/sin 0.0931 ± 0.0081 ms 0.0542 ± 0.0055 ms 1.72 ± 0.23
bareinterval/basics/sinh 9.99 ± 0.049 μs 9.98 ± 0.06 μs 1 ± 0.0078
bareinterval/basics/sqrt 1.23 ± 0.04 μs 1.14 ± 0.01 μs 1.08 ± 0.036
bareinterval/basics/tan 0.0522 ± 0.0046 ms 30.3 ± 7.9 μs 1.72 ± 0.48
bareinterval/basics/tanh 0.312 ± 0.0097 ms 0.311 ± 0.0098 ms 1 ± 0.045
interval/basics/* 3.02 ± 0.07 μs 2.79 ± 0.08 μs 1.08 ± 0.04
interval/basics/+ 1.59 ± 0.04 μs 1.33 ± 0.071 μs 1.2 ± 0.07
interval/basics/- 1.6 ± 0.041 μs 1.36 ± 0.041 μs 1.18 ± 0.046
interval/basics// 1.92 ± 0.17 μs 1.8 ± 0.05 μs 1.07 ± 0.099
interval/basics/abs 0.341 ± 0.049 μs 0.36 ± 0.09 μs 0.947 ± 0.27
interval/basics/acos 3.35 ± 0.069 μs 3.37 ± 0.061 μs 0.994 ± 0.027
interval/basics/asin 3.57 ± 0.049 μs 3.59 ± 0.059 μs 0.994 ± 0.021
interval/basics/atan 13.4 ± 0.23 μs 13.3 ± 0.23 μs 1.01 ± 0.025
interval/basics/cos 0.0932 ± 0.031 ms 0.0568 ± 0.0068 ms 1.64 ± 0.58
interval/basics/cosh 8.93 ± 0.07 μs 8.9 ± 0.071 μs 1 ± 0.011
interval/basics/exp 4.82 ± 0.07 μs 4.84 ± 0.07 μs 0.996 ± 0.02
interval/basics/inv 1.62 ± 0.039 μs 1.56 ± 0.04 μs 1.04 ± 0.037
interval/basics/log 2.54 ± 0.059 μs 2.54 ± 0.07 μs 1 ± 0.036
interval/basics/sin 0.0924 ± 0.031 ms 0.0544 ± 0.0045 ms 1.7 ± 0.58
interval/basics/sinh 10.6 ± 0.11 μs 10.7 ± 0.1 μs 0.989 ± 0.014
interval/basics/sqrt 1.69 ± 0.059 μs 1.6 ± 0.06 μs 1.06 ± 0.054
interval/basics/tan 0.0523 ± 0.0038 ms 31.4 ± 10 μs 1.67 ± 0.55
interval/basics/tanh 0.307 ± 0.014 ms 0.31 ± 0.01 ms 0.991 ± 0.056
time_to_load 0.105 ± 0.0015 s 0.109 ± 0.00044 s 0.966 ± 0.015
Memory benchmarks
master 4cd900b... master / 4cd900b...
BigFloat MPFI/basics/* 0.332 k allocs: 17.7 kB 0.332 k allocs: 17.7 kB 1
BigFloat MPFI/basics/+ 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/- 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics// 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/abs 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/acos 1.14 k allocs: 0.0407 MB 1.14 k allocs: 0.0407 MB 1
BigFloat MPFI/basics/asin 1.08 k allocs: 0.0417 MB 1.08 k allocs: 0.0417 MB 1
BigFloat MPFI/basics/atan 2.14 k allocs: 0.0543 MB 2.14 k allocs: 0.0543 MB 1
BigFloat MPFI/basics/cos 1.56 k allocs: 0.0425 MB 1.56 k allocs: 0.0425 MB 1
BigFloat MPFI/basics/cosh 0.759 k allocs: 0.0313 MB 0.759 k allocs: 0.0313 MB 1
BigFloat MPFI/basics/exp 0.902 k allocs: 0.036 MB 0.902 k allocs: 0.036 MB 1
BigFloat MPFI/basics/inv 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/log 0.407 k allocs: 20.6 kB 0.407 k allocs: 20.6 kB 1
BigFloat MPFI/basics/sin 1.91 k allocs: 0.0536 MB 1.91 k allocs: 0.0536 MB 1
BigFloat MPFI/basics/sinh 0.915 k allocs: 0.0369 MB 0.915 k allocs: 0.0369 MB 1
BigFloat MPFI/basics/sqrt 0.302 k allocs: 16.5 kB 0.302 k allocs: 16.5 kB 1
BigFloat MPFI/basics/tan 1.65 k allocs: 0.0493 MB 1.65 k allocs: 0.0493 MB 1
BigFloat MPFI/basics/tanh 0.908 k allocs: 0.0362 MB 0.908 k allocs: 0.0362 MB 1
BigFloat bareinterval/basics/* 0.262 k allocs: 26 kB 0.262 k allocs: 26 kB 1
BigFloat bareinterval/basics/+ 0.202 k allocs: 20.4 kB 0.202 k allocs: 20.4 kB 1
BigFloat bareinterval/basics/- 0.202 k allocs: 20.4 kB 0.202 k allocs: 20.4 kB 1
BigFloat bareinterval/basics// 0.1 k allocs: 10.8 kB 0.1 k allocs: 10.8 kB 1
BigFloat bareinterval/basics/abs 0.199 k allocs: 20.1 kB 0.199 k allocs: 20.1 kB 1
BigFloat bareinterval/basics/acos 1.27 k allocs: 0.0692 MB 1.27 k allocs: 0.0692 MB 1
BigFloat bareinterval/basics/asin 1.17 k allocs: 0.0659 MB 1.17 k allocs: 0.0659 MB 1
BigFloat bareinterval/basics/atan 2.04 k allocs: 0.058 MB 2.04 k allocs: 0.058 MB 1
BigFloat bareinterval/basics/cos 2.58 k allocs: 0.196 MB 3.57 k allocs: 0.206 MB 0.954
BigFloat bareinterval/basics/cosh 1.01 k allocs: 0.0671 MB 1.01 k allocs: 0.0671 MB 1
BigFloat bareinterval/basics/exp 0.802 k allocs: 0.0397 MB 0.802 k allocs: 0.0397 MB 1
BigFloat bareinterval/basics/inv 0.198 k allocs: 20 kB 0.198 k allocs: 20 kB 1
BigFloat bareinterval/basics/log 0.616 k allocs: 0.0522 MB 0.616 k allocs: 0.0522 MB 1
BigFloat bareinterval/basics/sin 3.02 k allocs: 0.209 MB 4.03 k allocs: 0.219 MB 0.954
BigFloat bareinterval/basics/sinh 0.815 k allocs: 0.0407 MB 0.815 k allocs: 0.0407 MB 1
BigFloat bareinterval/basics/sqrt 0.26 k allocs: 25.8 kB 0.26 k allocs: 25.8 kB 1
BigFloat bareinterval/basics/tan 1.73 k allocs: 0.129 MB 2.59 k allocs: 0.146 MB 0.888
BigFloat bareinterval/basics/tanh 0.808 k allocs: 0.0399 MB 0.808 k allocs: 0.0399 MB 1
BigFloat interval/basics/* 0.263 k allocs: 26.8 kB 0.263 k allocs: 26.8 kB 1
BigFloat interval/basics/+ 0.203 k allocs: 21.2 kB 0.203 k allocs: 21.2 kB 1
BigFloat interval/basics/- 0.203 k allocs: 21.2 kB 0.203 k allocs: 21.2 kB 1
BigFloat interval/basics// 0.101 k allocs: 11.6 kB 0.101 k allocs: 11.6 kB 1
BigFloat interval/basics/abs 0.2 k allocs: 20.9 kB 0.2 k allocs: 20.9 kB 1
BigFloat interval/basics/acos 1.71 k allocs: 0.11 MB 1.71 k allocs: 0.11 MB 1
BigFloat interval/basics/asin 1.47 k allocs: 0.0946 MB 1.47 k allocs: 0.0945 MB 1
BigFloat interval/basics/atan 2.04 k allocs: 0.0592 MB 2.04 k allocs: 0.0592 MB 0.999
BigFloat interval/basics/cos 2.58 k allocs: 0.197 MB 3.57 k allocs: 0.206 MB 0.955
BigFloat interval/basics/cosh 1.01 k allocs: 0.0681 MB 1.01 k allocs: 0.068 MB 1
BigFloat interval/basics/exp 0.803 k allocs: 0.0408 MB 0.803 k allocs: 0.0408 MB 1
BigFloat interval/basics/inv 0.199 k allocs: 20.8 kB 0.199 k allocs: 20.8 kB 1
BigFloat interval/basics/log 0.917 k allocs: 0.0805 MB 0.917 k allocs: 0.0805 MB 1
BigFloat interval/basics/sin 3.02 k allocs: 0.21 MB 4.03 k allocs: 0.22 MB 0.952
BigFloat interval/basics/sinh 0.816 k allocs: 0.0418 MB 0.816 k allocs: 0.0418 MB 0.999
BigFloat interval/basics/sqrt 0.714 k allocs: 0.0675 MB 0.714 k allocs: 0.0675 MB 1
BigFloat interval/basics/tan 1.73 k allocs: 0.13 MB 2.59 k allocs: 0.147 MB 0.886
BigFloat interval/basics/tanh 0.809 k allocs: 0.0411 MB 0.809 k allocs: 0.0411 MB 1
bareinterval/basics/* 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/+ 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/- 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics// 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/abs 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/acos 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/asin 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/atan 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/cos 0.806 k allocs: 0.0623 MB 0.803 k allocs: 0.0367 MB 1.7
bareinterval/basics/cosh 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/exp 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/inv 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/log 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/sin 0.806 k allocs: 0.0623 MB 0.803 k allocs: 0.0367 MB 1.7
bareinterval/basics/sinh 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/sqrt 2 allocs: 1.62 kB 2 allocs: 1.62 kB 1
bareinterval/basics/tan 0.416 k allocs: 0.0328 MB 0.409 k allocs: 20 kB 1.68
bareinterval/basics/tanh 1.03 k allocs: 0.0359 MB 1.03 k allocs: 0.0359 MB 1
interval/basics/* 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/+ 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/- 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics// 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/abs 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/acos 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/asin 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/atan 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/cos 0.807 k allocs: 0.0631 MB 0.804 k allocs: 0.0375 MB 1.69
interval/basics/cosh 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/exp 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/inv 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/log 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/sin 0.807 k allocs: 0.0631 MB 0.804 k allocs: 0.0375 MB 1.69
interval/basics/sinh 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/sqrt 3 allocs: 2.45 kB 3 allocs: 2.45 kB 1
interval/basics/tan 0.417 k allocs: 0.0336 MB 0.41 k allocs: 20.8 kB 1.66
interval/basics/tanh 1.03 k allocs: 0.0367 MB 1.03 k allocs: 0.0367 MB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

OlivierHnt and others added 5 commits November 1, 2026 22:44
The helper name was easy to confuse with the public `exact`. The new
name pairs with `_fround`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On 32-bit systems `2^60` overflows `Int32`, so `2^60 + 1` was 1 and the
quotient by `exact(true)` was exact, as it should be.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quadrant of the lower bound is now called `q` instead of `r`, and a
comment states what `_quadrants` returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The `_midpoint` helpers were placed between the docstring of `mid` and
its definition, so the docstring attached to `_midpoint` and the
documentation build failed on the `mid` cross references.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The trigonometric tests no longer use Logging, and the comment on the
cached irrational constants now names the restricted signature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants