From octave-sources-request at bevo dot che dot wisc dot edu Mon Aug 6 17:33:22 2001 Subject: Optimization: Replace NaN by Inf From: Etienne Grossmann To: help-octave at bevo dot che dot wisc dot edu, octave-sources@bevo.che.wisc.edu CC: etienne at isr dot ist dot utl dot pt, jeremy.denise@inria.fr Date: Mon, 06 Aug 2001 18:14:19 +0100 Hello, when optimizing a function 'f', I am tempted to replace any NaNs that it returns by Infs. This way, the returned value can be compared w/ other values, and the optimization algorithm is happy. Can anyone think of a reason not to replace NaNs by Infs inside an optimization algorithm? If not, I'll have my various optimization functions do the replacement. Etienne