Can anybody please help me find code for 128bit arithmetic(division,mul,sub,add) in C. I am using ANSI C compiler.


I did find this one open source library called Cephes.

Cephes Mathematical Library
ยป It includes these sections-- double: all functions in 64-bit double precision; single: all available functions in 32-bit single precision; long double: all available functions in 80-bit extended precision; 128bit: all available functions in 128-bit long double precision; qlib: all functions in q-type extended (44 to 106 decimal) precision, includes a C++ class for the binary floating point arithmetic and a q-type calculator program; c9x-complex: new C language standard C9X data type for complex variables, header complex.h for GNU C and functions in float complex, double complex, and long double complex precisions.

Additional links:

Cephes seems like the most reliable 128-bit library. If you have further questions, please feel free to ask. I hope this information has been useful.

- Stack Overflow