public boolean isNaN() {
return isNaN(fValue);
}
public static native boolean isNaN(double x) /*-{
return isNaN(x);
}-*/;
public boolean isInfinite() {
return isInfinite(fValue);
}
public static native boolean isInfinite(double x) /*-{
return !isFinite(x);
}-*/;
I want to use a couple of classes for doing numeric mathematics using
arrays ,which I had programmed before, which returned Double.NAN in
cases in which they were forced to do a division by zero or something
which was not defined, or even in cases in which a maximum number of
iterations had been reached. Double.NAN was returned because the
language demands that once set, there is only one return type for a
method.
This was my way of bypassing exception handling, which is a concept
endemic to programming and language-dependednt. I suppose so are
"fields", so if you have any ideas on how to fix this I would be very
grateful.