(FPCore (a b)
:precision binary64
(- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))
↓
(FPCore (a b)
:precision binary64
(- (+ (pow b 4.0) (+ (* (+ 4.0 (* 2.0 (* a a))) (* b b)) (pow a 4.0))) 1.0))
double code(double a, double b) {
return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
↓
double code(double a, double b) {
return (pow(b, 4.0) + (((4.0 + (2.0 * (a * a))) * (b * b)) + pow(a, 4.0))) - 1.0;
}
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (b * b))) - 1.0d0
end function
↓
real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((b ** 4.0d0) + (((4.0d0 + (2.0d0 * (a * a))) * (b * b)) + (a ** 4.0d0))) - 1.0d0
end function
public static double code(double a, double b) {
return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
↓
public static double code(double a, double b) {
return (Math.pow(b, 4.0) + (((4.0 + (2.0 * (a * a))) * (b * b)) + Math.pow(a, 4.0))) - 1.0;
}
herbie shell --seed 2022320
(FPCore (a b)
:name "Bouland and Aaronson, Equation (26)"
:precision binary64
(- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))