M
MrPugh
Hi!
I need to initialize a double with infinity (inf or 1.#INF). Now in
Windows you can do that by simply assigning it this way:
double x = numeric_limits<double>::infinity();
The problem is: on Unix-systems, that will return 0.0 .
Is there another way creating infinity besides division by zero (x =
1.0 / 0.0 would return the desired value, but not without a
warning...)?
Thanks in advance for the help.
Ruben
I need to initialize a double with infinity (inf or 1.#INF). Now in
Windows you can do that by simply assigning it this way:
double x = numeric_limits<double>::infinity();
The problem is: on Unix-systems, that will return 0.0 .
Is there another way creating infinity besides division by zero (x =
1.0 / 0.0 would return the desired value, but not without a
warning...)?
Thanks in advance for the help.
Ruben