我还有一个Java应用程序,它将从redis中读取这些值。有时,出于有效的原因,我们会得到一个浮点值,其值为NaN或-NaN。但是,在使用sprintf(charPtr, "%e", dblVal);时,该值将以nan的形式输出。我还在%E中尝试了同样的语句,结果产生了NAN。当Java试图通过Float.parseFloat()或Double.parseDouble进行解析时,它会抛出一个NumberFormatException。我已经完成了一段使用cmath s
看到的Double.java源代码和一些常量如下 * Constant for the Not-a-Number (NaN) value of the {@code double} type.*/ * Constant for the positive infinity value ofthe {@code double} type.pu