C++ float type Invalid Results

Introduction

Floating-Point Operations with NaN and +/-infinity Operands

OperationResult Operation Result
+/-value/0 +/-infinity 0/0NaN
+/-infinity +/- value+/-infinity +/-infinity/+/-infinityNaN
+/-infinity*value +/-infinity infinity-infinity NaN
+/-infinity/value +/-infinity infinity*0 NaN



PreviousNext

Related