[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Regarding ecvt() & fcvt() implementation
The more details about this implementation is given below:
cvt() function present in NetBsd :
static char *
cvt(value, ndigits, flags, sign, decpt, ch, length)
So, I have written ecvt & fcvt functions as below
ecvt(double value, int ndigit, int *decpt, int *sign)
return(cvt(value, ndigit, 0, sign, decpt, 'e', &addr));
fcvt(double value, int ndigit, int *decpt, int *sign)
return(cvt(value, ndigit, 0, sign, decpt, 'f', &addr));
But When I tested with the sample test below,
int main ()
int decpt, sign;
p = ecvt(10.0, 1, &decpt, &sign);
printf("decpt = %d,sign = %d,p = %s \n",decpt,sign,p);
I am getting the output as decpt = 2,sign = 12082816,p = 10 For netBsd
But with glibc output is decpt = 2, sign = 0, p =1
Please let me know is something wrong with my implementation ??
Or Do I need to modify the cvt() implementation, to get ecvt()
& fcvt() functions.
Please help me in this regard, Waiting for reply.
On Tue, 01 Sep 2009 14:40:11 +0530 wrote
I am the netbsd user from last one year.
I have one doubt which I would like to ask here.
When I checked the netbsd source, I found cvt() function is available but
ecvt() & fcvt()
is not implemented. So how can I implemented ecvt() & fcvt() functions using
Is it possible to implement these using cvt() ?
I found in openbsd they have implemented ecvt & fcvt functions using cvt.
Can anybody already tried to implemented it in netbsd.
Please let me know.
Waiting for reply,
Main Index |
Thread Index |