RE: [tcltk-perl] return of 1=>1.0 transformation error
Brought to you by:
hobbs
From: Konovalov, V. <vko...@sp...> - 2004-04-28 17:32:42
|
> if (SvIOK(sv) && ((double)(ival = SvIV(sv)) == dval)) { > > returns different results for 0 as 1.0, but a quick C check > with this: > > int ival = 1; > double dval = 1.0; > printf("%d\n", (((double)(ival = (int)dval)) == dval)); > > Says it should convert back and forth OK (that shows '1'). I > know you will have issues with incorrect double equality on > some corner cases. > > > You can investigate this using Devel::Peek. It is not part > > I only have 5.8 installed, so it always works for me. Perhaps > Vadim would like to hunt this down? I will hunt this down with a great pleasure, but will not have possibility to do this until nearest Saturday. For sure will do, but probably someone will do this faster. Vadim. |