Sorry for the previous mail which got sent accidentally. I'll clarify the question again.
The base type in most of the arithmetic functions is Sfdouble_t, which is defined as the following #define Sfdouble_t _ast_fltmax_t where _ast_fltmax_t is defined in src/lib/libast/ast_common.h header file which gets generated. Here with the changes I tried out in features/common, it is defined to be double as the following #define _ast_flt8_t double #define _ast_fltmax_t _ast_flt8_t Without the changes it will be defined to long double. #define _typ_long_double 1 /* long double is a type */ #define _ast_flt16_t long double #define _ast_fltmax_t _ast_flt16_t I was thinking that this would be enough for changing the default type, but from the test suite failures, it looks like we might need to update other places too. Thanks, Lijo On Mon, Sep 14, 2015 at 3:35 PM, lijo george <[email protected]> wrote: > > Sorry if I didn't make it clear > > The base type in most of the arithmetic functions is Sfdouble_t, > which is defined as the following > > > > #else > > On Mon, Sep 14, 2015 at 2:38 PM, Rüdiger Schütz <[email protected] > > wrote: > >> The C language, not the shell, defines that floating arithmetic has to be >> done in double precision. >> >> Rüdiger Schütz >> Enzianstraße 32 >> D-85098 Großmehring >> Tel.: +49 8407 930 257 >> Mobil: +49 178 811 8257 >> Email: [email protected] >> >> >> >> ------ Originalnachricht ------ >> Von: "lijo george" <[email protected]> >> An: [email protected] >> Gesendet: 14.09.2015 00:13:12 >> Betreff: [ast-developers] How to configure ksh93 to use double instead of >> long double as the default type >> >> >> Could someone let me know if it is possible at all to configure ksh93 to >> use >> only double precision instead of long double for arithmetic. >> >> I've tried removing it from the libast/features/common file as given >> below >> >> --- INIT.2011-02-08.old/src/lib/libast/features/common 2015-06-17 >> 13:46:27.643760200 -0700 >> +++ INIT.2011-02-08/src/lib/libast/features/common 2015-06-17 >> 13:49:27.771639200 -0700 >> @@ -1,7 +1,7 @@ >> iff AST_COMMON >> hdr pthread,stdarg,stddef,stdint,inttypes,types,unistd >> sys types >> -typ long.double,size_t,ssize_t >> +typ size_t,ssize_t >> typ __va_list stdio.h >> >> mac SF_APPEND,SF_CLOSE sys/stat.h sys/socket.h >> >> But this is causing lots of failures in the the math and arith test >> suites. >> So I guess this might not be the right way to do this. >> >> If someone has any pointers on this, please let me know. >> >> Thanks, >> Lijo >> >> >> >
_______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
