Skip to content

Commit

Permalink
basic: iplus(): use finite() instead of isfinite()
Browse files Browse the repository at this point in the history
Much faster. Not 100% sure that this isn't a cache effect, but
reordering stuff did not change anything, while using the finite()
function instead of the isfinite() macro (which uses __fpclassifyd())
does.
  • Loading branch information
uli committed Apr 27, 2018
1 parent 11935fd commit 4b28587
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ttbasic/basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6269,7 +6269,7 @@ num_t BASIC_FP iplus() {
break;

default:
if (!err && !isfinite(value) && !math_exceptions_disabled) {
if (!math_exceptions_disabled && !err && !finite(value)) {
if (isinf(value))
err = ERR_DIVBY0;
else
Expand Down

0 comments on commit 4b28587

Please sign in to comment.