Invalid Floating-Point Results - C++ Data Type

C++ examples for Data Type:float

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

Related Tutorials