(define (asin x)
  (if (or (> x 1.0) (< x -1.0))
    0.0
    (* 2.0 (atan (/ x (+ 1.0 (sqrt (- 1.0 (* x x)))))))))