Created
June 10, 2018 14:55
-
-
Save cqfd/0d495c5f7900526d04c93ca6b7188dbd 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
def pow(original: Real, exponent: Real): Real = | |
exponent match { | |
case Constant(exponent) => pow(original, exponent) | |
case _ => (original.log * exponent).exp | |
} | |
// delegates to def pow(original: Real, exponent: BigDecimal): Real = ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment