diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-10 11:39:48 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-10 11:39:48 +0000 |
commit | a1bd196e40598e773ccd679fc8778a94de7814af (patch) | |
tree | d1e28fa6d716eb2ffee3c4d276dfa5981dc4ba62 /pp.c | |
parent | 59e80644698b885dcac452ef557a6e673392eff7 (diff) | |
download | perl-a1bd196e40598e773ccd679fc8778a94de7814af.tar.gz |
pp_modulo comment tweak from Ilya
p4raw-id: //depot/perl@3377
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 17 |
1 files changed, 6 insertions, 11 deletions
@@ -1003,8 +1003,8 @@ PP(pp_modulo) else { dleft = POPn; if (!use_double) { - use_double = 1; - dright = right; + use_double = 1; + dright = right; } left_neg = dleft < 0; if (left_neg) @@ -1015,16 +1015,16 @@ PP(pp_modulo) double dans; #if 1 - /* Tried: DOUBLESIZE <= UV_SIZE = Precision of UV more than of NV. - * But in fact this is an optimization - trunc may be slow */ - /* Somehow U_V is pessimized even if CASTFLAGS is 0 */ # if CASTFLAGS & 2 # define CAST_D2UV(d) U_V(d) # else # define CAST_D2UV(d) ((UV)(d)) # endif - + /* Tried to do this only in the case DOUBLESIZE <= UV_SIZE, + * or, in other words, precision of UV more than of NV. + * But in fact the approach below turned out to be an + * optimization - floor() may be slow */ if (dright <= UV_MAX && dleft <= UV_MAX) { right = CAST_D2UV(dright); left = CAST_D2UV(dleft); @@ -1033,13 +1033,8 @@ PP(pp_modulo) #endif /* Backward-compatibility clause: */ -#if 0 - dright = trunc(dright + 0.5); - dleft = trunc(dleft + 0.5); -#else dright = floor(dright + 0.5); dleft = floor(dleft + 0.5); -#endif if (!dright) DIE("Illegal modulus zero"); |