Hello,Thank you for your code and your help !My code was:let formule = pow(x,3.0)let x = -2.0 //examplelet expression = NSExpression(format: formule)let objet = [x:x]let expression1 = NSExpression(format: formule)let ResultatFonction = expression1.expressionValue(with: objet, context: nil)as?DoubleMy wish is to automatically calculate the formula pow (x, y) for x between -100 and 100 and y between 1 and 10.I agree for the absolute, but only if the power is an even number.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: