Commit c5249e91 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Test long double precision

parent 6dce6596
Pipeline #58578 failed with stage
in 20 seconds
......@@ -16,6 +16,7 @@
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <float.h>
/******************************************************************************/
/* Auxiliary routines */
......@@ -48,6 +49,14 @@ void test_one(int* fail, double limit, double a, double b)
/******************************************************************************/
int main(void) {
// Test long doubles.
printf("Info: long double epsilon = %12.6Lg\n", LDBL_EPSILON);
if (LDBL_EPSILON > 1.2e-19) {
printf("Insufficient precision of long double type, libkww cannot work properly\n");
return 1;
}
// Test specific function values.
int fail = 0;
test_one(&fail, 1e-14, kwwc(1e-6, 1.), 0.9999999999990000221);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment