summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'math.c')
-rw-r--r--math.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/math.c b/math.c
index 3c99e51..8e9629d 100644
--- a/math.c
+++ b/math.c
@@ -1,8 +1,19 @@
+#ifdef __DECC
+
+#include <machine/builtins.h>
+#define __rpcc(x) __RPCC(x)
+extern int printf (const char * format, ...);
+#define M_PI 3.14159265358979323846 /* pi */
+
+#elif defined __GNUC__
+
+#define __rpcc(x) __builtin_alpha_rpcc(x)
#include <stdio.h>
#include <math.h>
-#include <stdint.h>
-#define __rpcc __builtin_alpha_rpcc
+#else
+#error Unknown compiler
+#endif
#define CPML "cpml"
#define GLIBC "glibc"
@@ -25,13 +36,14 @@ double FUNCTION(double);
#define INCREMENT 0.1
#endif
+
int main(int argc, char * argv[]) {
double x;
double results[100];
int i;
int iterations;
- uint32_t start, end;
+ unsigned int start, end;
start = __rpcc();