tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

silly behavior of factor(6)



observe:

   % /usr/games/factor 2 1 0 3 4
   2: 2
   1: 1
   %

factor.c has:

        if (BN_is_zero(val))    /* Historical practice; 0 just exits. */
                exit(0);

This has been this way since our -r1.1; the comment was added when
4.4-Lite was merged.

Does anyone know of any reason to maintain this silly behavior?

(And does anyone want to bikeshed about whether 0 should generate
   0: 0
or
   0:
or nothing at all but continue to the next number?)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index