diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-01 23:26:58 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-01 23:31:23 +0200 |
| commit | e1ecb8cabe2661c639fbdfe1ebcdbb0263dac8e7 (patch) | |
| tree | 1ee9ce953bce3c098452dae4a424d95c9aa23a0b /tests | |
| parent | 7ef687ec53b5477ae556f7e67ce9e6309de3341f (diff) | |
Simplify `pow` function
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compute/calc.typ | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/typ/compute/calc.typ b/tests/typ/compute/calc.typ index ee063707..51569f7a 100644 --- a/tests/typ/compute/calc.typ +++ b/tests/typ/compute/calc.typ @@ -77,6 +77,23 @@ #test(calc.min("hi"), "hi") --- +// Test the `calc` function. +#test(calc.pow(10, 0), 1) +#test(calc.pow(2, 4), 16) + +--- +// Error: 10-16 zero to the power of zero is undefined +#calc.pow(0, 0) + +--- +// Error: 14-31 exponent is too large +#calc.pow(2, 10000000000000000) + +--- +// Error: 14-36 exponent may not be NaN, infinite, or subnormal +#calc.pow(2, calc.pow(2.0, 10000.0)) + +--- // Error: 10-12 expected at least one value #calc.min() |
