2010/12/26 Sayth Renshaw <[email protected]>:
> [...]
> However I don't think any value could test true therefore my function would
> always be false. I do need to double check though as my math is rusty. But
> you cannot square a number and have it retun negative can you?
> [...]

Hello Sayth,

whether that is possible depends on the domain of the function. Real
numbers never produce negative results when squared, complex numbers
may do so, though. More precisely, every negative real number has an
imaginary square root.

> [...]
> ;;; equation : number --> boolean
> ;;; to determine whether n is true for the equation (2 - n(squared) = 102)
> (define (forn x)
>   (= (- 2 (* x x) ) 102))
> [...]

Try evaluating (forn 0+10i).

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.
_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to