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