Hi.
I notice this code at the top of "FastMath.log1p":
---CUT---
if (x == -1) {
return x/0.0; // -Infinity
}
if (x > 0 && 1/x == 0) { // x = Infinity
return x;
}
---CUT---
which I'm tempted to rewrite as:
---CUT---
if (x == -1) {
return Double.NEGATIVE_INFINITY;
}
if (x == Double.POSITIVE_INFINITY) {
return Double.POSITIVE_INFINITY;
}
---CUT---
Any objection?
Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]