Re: Standard library praise and challenge

new topic     » goto parent     » topic index » view thread      » older message » newer message

Objects:

you said:

Agreed. Even sqrt(-1) dies instead of returning NaN, despite  
the latter behavior being explicitly allowed by the floating  
point standard. 
 
I think this is also keeping with the design principle of  
"Fail Early." 

Sqrt(-1) should not return NaN because i is not anything like a real or a sequence. There cannot be an order for complex numbers unless you define 2 numbers as being equal if the distance from (0,0) (or (0,0,0) ... etc is the same) (metric spaces).

If max({}) fails what of max({ {} }). Are you say max() can only return a number?

Bill

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu