Type: Rephrase computer types comparison with mathematics abstract concepts
In 1-ProceduralProgramming/3-Types.ipynb:
Numeric limits
Always keep in mind the types of the computer don't match the abstract concept you may use in mathematics... The types stored especially don't go from minus infinity to infinity:
I am not sure of what we wanted to say by The types stored especially don't go from minus infinity to infinity
.
A type can have or not infinity (cf. has_infinity). If it has infinity, it can be either:
double inf = std::numeric_limits<double>::infinity();
double minus_inf = - std::numeric_limits<double>::infinity();
bool val = std::isinf(inf - 1); // val is true