From 094535c010320967639e8e86f974d878e80baa72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 1 May 2015 16:13:57 +0200 Subject: Imported Upstream version 1.7.0 --- xicc/monctest.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'xicc/monctest.c') diff --git a/xicc/monctest.c b/xicc/monctest.c index 8630099..a97b1b5 100644 --- a/xicc/monctest.c +++ b/xicc/monctest.c @@ -26,8 +26,9 @@ #include "copyright.h" #include "aconfig.h" #include "numlib.h" -#include "plot.h" #include "moncurve.h" +#include "plot.h" +#include "ui.h" double lin(double x, double xa[], double ya[], int n); void usage(void); @@ -141,17 +142,24 @@ int main() { /* Create X values */ for (i = 0; i < pnts; i++) - xa[i] = i/(pnts-1.0); + xa[i] = pow(i/(pnts-1.0), 1.0); + + for (i = 0; i < pnts; i++) + ya[i] = pow(xa[i], ex); + + } else if (n == 1) { /* inverse exponential function aproximation */ + double ex = 1.0/2.4; + pnts = MAX_PNTS; + + printf("Trial %d, no points = %d, exponential %f\n",n,pnts,ex); + + /* Create X values */ + for (i = 0; i < pnts; i++) + xa[i] = pow(i/(pnts-1.0), 3.0); for (i = 0; i < pnts; i++) ya[i] = pow(xa[i], ex); - } else if (n < (TSETS+1)) /* Standard versions */ { - pnts = t1p[n-1]; - for (i = 0; i < pnts; i++) { - xa[i] = t1xa[n-1][i]; - ya[i] = t1ya[n-1][i]; - } #endif } else { /* Random versions */ -- cgit v1.2.3