0 Members and 1 Guest are viewing this topic.
LuaJIT 2.0.0-beta7 — 2011-05-05 New features: ARM port of the LuaJIT interpreter is complete.
// test program for NONCAS 1.7static const unsigned sqrt_addrs[] = {0X102A2490, 0x0}; #define sqrt SYSCALL_CUSTOM(sqrt_addrs, double ,double)int main(void) { double rr; rr = 2.0; printf("square root of 2 is %lf\n",sqrt(rr) ); return 0;}
static const unsigned sqrt_addrs[] = {0X102A2490, 0x0}; #define sqrt SYSCALL_CUSTOM(sqrt_addrs, double ,double)double dswap(double v) { union { unsigned long long i; double d; } conv; conv.d = v; conv.i = (conv.i << 32) | (conv.i >> 32); return conv.d;}int main(void) { double rr; rr = 2.0; printf("square root of 2 = %15.15f\n",sqrt(dswap(rr))); return 0;}