(FPCore (x y z t a b)
:precision binary64
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))
↓
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t -1.0) (log a))))
(if (or (<= t_1 -650.0) (not (<= t_1 -225.0)))
(/ (* x (exp (- (+ t_1 (* y (log z))) b))) y)
(* x (/ (pow z y) (* a (* y (exp b))))))))
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x * exp((((y * log(z)) + ((t - 1.0d0) * log(a))) - b))) / y
end function
↓
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t + (-1.0d0)) * log(a)
if ((t_1 <= (-650.0d0)) .or. (.not. (t_1 <= (-225.0d0)))) then
tmp = (x * exp(((t_1 + (y * log(z))) - b))) / y
else
tmp = x * ((z ** y) / (a * (y * exp(b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x * Math.exp((((y * Math.log(z)) + ((t - 1.0) * Math.log(a))) - b))) / y;
}
↓
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + -1.0) * Math.log(a);
double tmp;
if ((t_1 <= -650.0) || !(t_1 <= -225.0)) {
tmp = (x * Math.exp(((t_1 + (y * Math.log(z))) - b))) / y;
} else {
tmp = x * (Math.pow(z, y) / (a * (y * Math.exp(b))));
}
return tmp;
}
def code(x, y, z, t, a, b):
return (x * math.exp((((y * math.log(z)) + ((t - 1.0) * math.log(a))) - b))) / y
↓
def code(x, y, z, t, a, b):
t_1 = (t + -1.0) * math.log(a)
tmp = 0
if (t_1 <= -650.0) or not (t_1 <= -225.0):
tmp = (x * math.exp(((t_1 + (y * math.log(z))) - b))) / y
else:
tmp = x * (math.pow(z, y) / (a * (y * math.exp(b))))
return tmp
function code(x, y, z, t, a, b)
return Float64(Float64(x * exp(Float64(Float64(Float64(y * log(z)) + Float64(Float64(t - 1.0) * log(a))) - b))) / y)
end
↓
function code(x, y, z, t, a, b)
t_1 = Float64(Float64(t + -1.0) * log(a))
tmp = 0.0
if ((t_1 <= -650.0) || !(t_1 <= -225.0))
tmp = Float64(Float64(x * exp(Float64(Float64(t_1 + Float64(y * log(z))) - b))) / y);
else
tmp = Float64(x * Float64((z ^ y) / Float64(a * Float64(y * exp(b)))));
end
return tmp
end
function tmp = code(x, y, z, t, a, b)
tmp = (x * exp((((y * log(z)) + ((t - 1.0) * log(a))) - b))) / y;
end
↓
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (t + -1.0) * log(a);
tmp = 0.0;
if ((t_1 <= -650.0) || ~((t_1 <= -225.0)))
tmp = (x * exp(((t_1 + (y * log(z))) - b))) / y;
else
tmp = x * ((z ^ y) / (a * (y * exp(b))));
end
tmp_2 = tmp;
end
(*.f64 x (/.f64 (/.f64 (pow.f64 z y) (pow.f64 a (-.f64 1 t))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 z) y))) (pow.f64 a (-.f64 1 t))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (Rewrite<= *-commutative_binary64 (*.f64 y (log.f64 z)))) (pow.f64 a (-.f64 1 t))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (pow.f64 a (Rewrite<= unsub-neg_binary64 (+.f64 1 (neg.f64 t))))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (pow.f64 a (Rewrite=> +-commutative_binary64 (+.f64 (neg.f64 t) 1)))) (*.f64 y (exp.f64 b)))): 15 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (pow.f64 a (+.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 t)) 1))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 15 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (pow.f64 a (Rewrite=> associate-+l-_binary64 (-.f64 0 (-.f64 t 1))))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (pow.f64 a (Rewrite<= neg-sub0_binary64 (neg.f64 (-.f64 t 1))))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (Rewrite<= exp-to-pow_binary64 (exp.f64 (*.f64 (log.f64 a) (neg.f64 (-.f64 t 1)))))) (*.f64 y (exp.f64 b)))): 15 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (exp.f64 (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 (-.f64 t 1)) (log.f64 a))))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 15 points decrease in error
(*.f64 x (/.f64 (/.f64 (exp.f64 (*.f64 y (log.f64 z))) (exp.f64 (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 (-.f64 t 1) (log.f64 a)))))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (Rewrite<= exp-diff_binary64 (exp.f64 (-.f64 (*.f64 y (log.f64 z)) (neg.f64 (*.f64 (-.f64 t 1) (log.f64 a)))))) (*.f64 y (exp.f64 b)))): 17 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (exp.f64 (-.f64 (*.f64 y (log.f64 z)) (Rewrite=> distribute-lft-neg-in_binary64 (*.f64 (neg.f64 (-.f64 t 1)) (log.f64 a))))) (*.f64 y (exp.f64 b)))): 15 points increase in error, 2 points decrease in error
(*.f64 x (/.f64 (exp.f64 (Rewrite=> cancel-sign-sub_binary64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t 1) (log.f64 a))))) (*.f64 y (exp.f64 b)))): 0 points increase in error, 15 points decrease in error
(*.f64 x (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (exp.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t 1) (log.f64 a)))) (exp.f64 b)) y))): 15 points increase in error, 0 points decrease in error
(*.f64 x (/.f64 (Rewrite<= exp-diff_binary64 (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t 1) (log.f64 a))) b))) y)): 0 points increase in error, 15 points decrease in error
(Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 x (exp.f64 (-.f64 (+.f64 (*.f64 y (log.f64 z)) (*.f64 (-.f64 t 1) (log.f64 a))) b))) y)): 0 points increase in error, 0 points decrease in error
(*.f64 (/.f64 (pow.f64 z y) (*.f64 a (*.f64 y (exp.f64 b)))) x): 0 points increase in error, 0 points decrease in error
(Rewrite<= associate-/r/_binary64 (/.f64 (pow.f64 z y) (/.f64 (*.f64 a (*.f64 y (exp.f64 b))) x))): 0 points increase in error, 0 points decrease in error
(Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 z y) x) (*.f64 a (*.f64 y (exp.f64 b))))): 6 points increase in error, 0 points decrease in error
(/.f64 (*.f64 (pow.f64 z y) x) (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 y (exp.f64 b)) a))): 0 points increase in error, 6 points decrease in error
(/.f64 (*.f64 (pow.f64 z y) x) (Rewrite=> associate-*l*_binary64 (*.f64 y (*.f64 (exp.f64 b) a)))): 6 points increase in error, 0 points decrease in error
(/.f64 (*.f64 (pow.f64 z y) x) (*.f64 y (Rewrite<= *-commutative_binary64 (*.f64 a (exp.f64 b))))): 0 points increase in error, 6 points decrease in error
herbie shell --seed 2022343
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))
(/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))