tinyexpr: Check for nan in ncr

Turns out this takes ages.

Fixes #8170
This commit is contained in:
Fabian Homborg
2021-07-26 18:39:09 +02:00
parent 4bb1c72a91
commit d32e1c12be
2 changed files with 8 additions and 0 deletions

View File

@@ -219,3 +219,9 @@ math pow 2, cos -pi
# i.e. 4
math pow 2 x cos'(-pi)', 2
# CHECK: 4
# This used to take ages, see #8170.
# If this test hangs, that's reintroduced!
math 'ncr(0/0, 1)'
# CHECKERR: math: Error: Result is infinite
# CHECKERR: 'ncr(0/0, 1)'