[racket] Rusty Math

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Dec 26 09:05:15 EST 2010

The number would have to be complex, but sure you can do that:

> (forn 0+10i)
#t

Robby

On Sun, Dec 26, 2010 at 6:04 AM, Sayth Renshaw <flebber.crue at gmail.com> wrote:
> I was doing an exmple and thinking about my expected retrun value to kow if
> my function worked.
>
> 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?
>
> This is my working.
>
> ;;; equation : number --> boolean
> ;;; to determine whether n is true for the equation (2 - n(squared) = 102)
> (define (forn x)
>   (= (- 2 (* x x) ) 102))
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>


Posted on the users mailing list.