From 1fd0dce8d72c4d5869ce5ff4025ac09af603bc0f Mon Sep 17 00:00:00 2001 From: siddhu8990 Date: Wed, 19 Apr 2017 14:57:49 +0530 Subject: Merged Shamik's work --- .../radix_conversions/dec2oct/ddec2octs.c | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c (limited to 'src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c') diff --git a/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c b/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c new file mode 100644 index 0000000..d06da30 --- /dev/null +++ b/src/c/elementaryFunctions/radix_conversions/dec2oct/ddec2octs.c @@ -0,0 +1,27 @@ +#include +#include +#include "dec2oct.h" +#include + +void ddec2octs(double in,double* out) +{ + int i=0,j=0,tmp=0; + int quotient; + quotient=(int)in; + while(quotient!=0) + { + out[i++]= quotient%8; + quotient=quotient/8; + } + j=i-1; + i=0; + + while(i