aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/precision.h
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-04-24 09:41:07 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-04-24 09:41:07 -0400
commitb23fe21501d41d4de75dde9968f0a785f81c083b (patch)
tree1bfb5832ece035beb2135033feee6284d657b217 /src/precision.h
parent5923266441c8c8847d94ce21cdc6bf698c748dd5 (diff)
parent223c2a359a02602951771d960bd517d7cf6f3f9f (diff)
Merge branch 'main' of github.com:jpappel/complex-fractals
Diffstat (limited to 'src/precision.h')
-rw-r--r--src/precision.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/precision.h b/src/precision.h
new file mode 100644
index 0000000..4bca354
--- /dev/null
+++ b/src/precision.h
@@ -0,0 +1,31 @@
+/*
+ * Header that allows conditional compilation into double floating point precisions ot extended double floating point precision
+ *
+ * CUDA does not support long double so cuda-fractals may fail to compile or have unexpected behavior if linked with code that was compiled with EXTENDED_PRECISION
+ */
+#pragma once
+
+#ifdef EXTENDED_PRECISION
+
+#define CBASE long double
+#define CREAL creall
+#define CIMAG cimagl
+#define CPOW cpowl
+#define CONJ conjl
+#define CABS cabsl
+#define RABS fabsl
+#define CFORMAT "%Lf"
+
+#endif
+#ifndef EXTENDED_PRECISION
+
+#define CBASE double
+#define CREAL creal
+#define CIMAG cimag
+#define CPOW cpow
+#define CONJ conj
+#define CABS cabs
+#define RABS fabs
+#define CFORMAT "%lf"
+
+#endif