From 506a8b8f1b4c057204aee08ee7ba73996cb63c2a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 21 Apr 2022 22:09:04 +0200 Subject: [PATCH] parser accepts inf --- util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/util.cpp b/util.cpp index 5d930838..c2940973 100644 --- a/util.cpp +++ b/util.cpp @@ -344,6 +344,7 @@ cld exp_parser::parse(int prio) { else if (auto *p = hr::at_or_null(params, number)) res = (*p)->get_cld(); else if(number == "e") res = exp(1); else if(number == "i") res = cld(0, 1); + else if(number == "inf") res = HUGE_VAL; else if(number == "p" || number == "pi") res = M_PI; else if(number == "" && next() == '-') { at++; res = -parse(20); } else if(number == "") throw hr_parse_exception("number missing, " + where());