Skip to content

Commit

Permalink
Formula engine: now exponentiation returns null on NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Mar 18, 2016
1 parent 6da744a commit b53ee99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/variant.cpp
Expand Up @@ -750,6 +750,8 @@ variant variant::operator^(const variant& v) const
if( type_ == TYPE_DECIMAL || v.type_ == TYPE_DECIMAL ) {

double res = pow( as_decimal()/1000.0 , v.as_decimal()/1000.0 );

if(res != res) return variant();

return variant(res, DECIMAL_VARIANT);
}
Expand Down

0 comments on commit b53ee99

Please sign in to comment.