Created
May 18, 2011 14:12
-
-
Save odyssomay/978643 to your computer and use it in GitHub Desktop.
Clojure unchecked double division
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
public class Div { | |
public static double divide_double(double x, double y) { | |
return x / y; | |
} | |
} |
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
; To use the above in clojure | |
(import 'Div) | |
(println (Div/divide-double 1.0 0.0)) | |
; => Infinity |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment