comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » NaN Magic or Why Me?!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
NaN Magic or Why Me?! [message #56761] Tue, 13 November 2007 09:42 Go to previous message
Mort Canty is currently offline  Mort Canty
Messages: 134
Registered: March 2003
Senior Member
Hi. Here's a trick with IDL: I'm running a neural network program (IDL
6.3, Windows XP) which is printing out a cost function as it goes:

1.41914e+006 332780. 328493.
363745. 327434. 333099.
334286. 320390. 371921.
349013. 304647. 323247.
314879. 312924. 386168.
362931. 346616. 306625.
340137. 309213. 302789.
302587. 313369. 310620.
301379. 307119. 302866.
307930. 295240. 304881.
301841. 317709. 292358.
321169. 297112. 391706.
297928. 305506. 299264.
315475. 288123. 292904.
308228. 294505. 288769.
305784. 299221. 359080.
295104. 297367. 302781.
290047. 277969. 285225.
279158. 283448. 306711.
282240. 283696. 283543.
294153. -NaN 280851.
281700. 303358.

Did you see the NaN? Now watch: I restart the program under identical
conditions:

1.41914e+006 332780. 328493.
363745. 327434. 333099.
334286. 320390. 371921.
349013. 304647. 323247.
314879. 312924. 386168.
362931. 346616. 306625.
340137. 309213. 302789.
302587. 313369. 310620.
301379. 307119. 302866.
307930. 295240. 304881.
301841. 317709. 292358.
321169. 297112. 391706.
297928. 305506. NaN
315475. 288123. 292904.
308228. 294505. 288769
...

Cool huh? Sequence is identical but the NaN has moved (and changed sign
to boot). That's not all. Now I logout and logon under a different user
account. Same program, same IDL, same conditions:

1.41914e+006 332780. 328493.
363745. 327434. 333099.
334286. 320390. 371921.
349013. 304647. 323247.
314879. 312924. 386168.
362931. 346616. 306625.
340137. 309213. 302789.
302587. 313369. 310620.
301379. 307119. 302866.
307930. 295240. 304881.
301841. 317709. 292358.
321169. 297112. 391706.
297928. 305506. 299264.
315475. 288123. 292904.
308228. 294505. 288769.
305784. 299221. 359080.
295104. 297367. 302781.
290047. 277969. 285225.
279158. 283448. 306711.
282240. 283696. 283543.
294153. 446049. 280851.
281700. 303358. 355329.
288240. 297747. 315557.
287779. 314566. 272712.
290404. 278610. 281469.
297105.

Where'd it go?. Now the program runs forever without any NaNs. I'd like
to post the code so you, too, can amaze your friends, but unfortunately
the trick only works on my bloody computer.

Seriously, can someone, anyone, tell me might be going on?

Cheers

Mort

PS It's not a memory error. I replaced the DIMMS completely.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Efficient way to split an array of strings.
Next Topic: Re: Efficient way to split an array of strings.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:42:09 PDT 2025

Total time taken to generate the page: 0.00390 seconds