Checks whether a number is a float (possible lossy).
| 983 | |
| 984 | // Checks whether a number is a float (possible lossy). |
| 985 | bool IsFloat() const { |
| 986 | if ((data_.f.flags & kDoubleFlag) == 0) |
| 987 | return false; |
| 988 | double d = GetDouble(); |
| 989 | return d >= -3.4028234e38 && d <= 3.4028234e38; |
| 990 | } |
| 991 | // Checks whether a number can be losslessly converted to a float. |
| 992 | bool IsLosslessFloat() const { |
| 993 | if (!IsNumber()) return false; |
nothing calls this directly
no test coverage detected