Some factors to consider:
Should this function validate its input and warn/fail if a non-numeric value is provided? The built-in functions do not do this
Actually, they do.
>perl -wE"say sin('foo')" Argument "foo" isn't numeric in sin at -e line 1. 0 >perl -wE"say cos('3.1415bar')" Argument "3.1415bar" isn't numeric in cos at -e line 1. -0.999999995707656
In reply to Re: Parameter validation for numeric function arguments?
by ikegami
in thread Parameter validation for numeric function arguments?
by janert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |