projects
/
nestedvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
misc test changes
[nestedvm.git]
/
src
/
tests
/
Simple.c
diff --git
a/src/tests/Simple.c
b/src/tests/Simple.c
index
02f0700
..
c943264
100644
(file)
--- a/
src/tests/Simple.c
+++ b/
src/tests/Simple.c
@@
-1,23
+1,10
@@
+#include <math.h>
-int precision = 7;
-long long r;
-
-#define HOST_BITS_PER_WIDE_INT 64
-#define HOST_WIDE_INT long long
-
-long long x = 123;
-
-int dec(long long x){
- return x - 1;
-}
+double d = -1.23;
int _start() {
int _start() {
- //long long r = (((HOST_WIDE_INT) 1 << (precision - 1)) - 1);
- //long long r = ((HOST_WIDE_INT) 1 << (precision)) - 1;
- long long r = x - 1;
-
- //r = dec(x);
- r >>= 32;
-
- return r;
+ int n;
+ d = fabs(d);
+ n = (int)(d*100);
+ return n;;
}
}