securely comparison of floating-point variables */
| 587 | |
| 588 | /* securely comparison of floating-point variables */ |
| 589 | static cJSON_bool compare_double(double a, double b) |
| 590 | { |
| 591 | double maxVal = fabs(a) > fabs(b) ? fabs(a) : fabs(b); |
| 592 | return (fabs(a - b) <= maxVal * DBL_EPSILON); |
| 593 | } |
| 594 | |
| 595 | /* Render the number nicely from the given item into a string. */ |
| 596 | static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer) |
no outgoing calls
no test coverage detected