00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <stdio.h>
00020 #include "scs.h"
00021 #include "scs_private.h"
00022
00023
00024
00025
00026
00027
00028 void print_order(unsigned int x, int nb, int b){
00029 if (nb<=0)
00030 return;
00031 print_order(x/b, nb-1, b);
00032 printf("%d",x%b);
00033 return;
00034 }
00035
00036
00037
00038
00039 void print_integer(unsigned int x, int b, int nb){
00040
00041 if ((b < 2)||(b>16)){
00042 fprintf(stderr," ERROR: You musn't print number with a base larger than 10 or less than 2 \n");
00043 return;
00044 }
00045 print_order(x, nb, b);
00046 return;
00047 }
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 void scs_get_std( scs_ptr x){
00060 int i;
00061 scs_db_number d;
00062
00063 scs_get_d(&d.d, x);
00064 printf("Exception : %e \n", X_EXP);
00065 printf("Index= %d \n Sign= %d \n Double value= %.30e \n Hex mantissa= %x %x\n",
00066 X_IND, X_SGN, d.d, d.i[HI_ENDIAN], d.i[LO_ENDIAN]);
00067 for(i=0;i<SCS_NB_WORDS;i++){
00068 printf(" D %d : %8x %20d \n",i, X_HW[i], X_HW[i]);
00069 }
00070 }
00071
00072
00073