securely comparison of floating-point variables */
| 536 | |
| 537 | /* securely comparison of floating-point variables */ |
| 538 | static cJSON_bool compare_double(double a, double b) |
| 539 | { |
| 540 | double maxVal = fabs(a) > fabs(b) ? fabs(a) : fabs(b); |
| 541 | return (fabs(a - b) <= maxVal * DBL_EPSILON); |
| 542 | } |
| 543 | |
| 544 | /* Render the number nicely from the given item into a string. */ |
| 545 | static cJSON_bool print_number(const cJSON * const item, printbuffer * const output_buffer) |
no outgoing calls
no test coverage detected