Metropoli BBS
VIEWER: zdiv.txt MODE: TEXT (ASCII)
a # 1 60 R ' r#n zdiv d                                                 '
a # a,[1]  '"returns zero when divisor is zero                          '
a # a,[1]  '"apl returns unity when n and d are both zero               '
a # a,[1]  ' r#(nXr)%(dXr)+~r#(n=0)Vd^=0                                '
a # a,[1]  ' $0                                                         '
a # a,[1]  '"zdiv - zero tolerant division                              '
a # a,[1]  '"from ''the apl handbook of techniques'' copyright 1978, ibm. '
a # a,[1]  '"-domain errors are undesired in commercial matrix          '
a # a,[1]  '" operations where zeros usually indicate unavailable       '
a # a,[1]  '" information.                                              '
a # a,[1]  '"-n and d are conformable numeric structures or scalars in  '
a # a,[1]  '" and combination.                                          '
a # a,[1]  '"-zero will be returned instead of the domain error.        '
Lfx a
[ RETURN TO DIRECTORY ]