Created
February 5, 2011 16:44
-
-
Save t0yv0/812578 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket | |
| (define (quadratic a b c) | |
| (let* ([det (- (* b b) (* 4 a c))] | |
| [x1 (/ (- (sqrt det) b) (* 2 a))] | |
| [x2 (/ (- (- (sqrt det)) b) (* 2 a))]) | |
| (vector x1 x2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment