From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5d7fd86629dd2404be0d9b93d0e0333c@felloff.net> Date: Mon, 2 May 2016 21:49:06 +0200 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] store NaN() to memory traps on 386 (387) Topicbox-Message-UUID: 8e47dd42-ead9-11e9-9d60-3106f5b1d025 >> cpu% seq nan >> seq 11791387: suicide: sys: fp: invalid operation fppc=0x2635 status=0x8081 pc=0x0000122 > that seems reasonable to me. what could seq possibly do with nan? thats the thing. its not expecting nan. and having the process trap for this input seems rather drastic. imagine we'd make atoi() abort() when the input isnt a valid integer and demand that every caller of atoi() checks beforehand if the input string is a decimal number. writing that check in case for real numbers is even more complicated than writing a test for decimal integers. -- cinap