
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * 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 + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * 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 + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (* z (- 1.0 (log t))) (fma (+ a -0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - log(t))) + fma((a + -0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + fma(Float64(a + -0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \mathsf{fma}\left(a + -0.5, b, x + y\right)
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -2000000000.0)
(fma b (+ a -0.5) (+ x y))
(if (<= t_1 5e-9) (+ x (+ (* z (- 1.0 (log t))) y)) (+ (+ x y) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (t_1 <= -2000000000.0) {
tmp = fma(b, (a + -0.5), (x + y));
} else if (t_1 <= 5e-9) {
tmp = x + ((z * (1.0 - log(t))) + y);
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (t_1 <= -2000000000.0) tmp = fma(b, Float64(a + -0.5), Float64(x + y)); elseif (t_1 <= 5e-9) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - log(t))) + y)); else tmp = Float64(Float64(x + y) + t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000000.0], N[(b * N[(a + -0.5), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-9], N[(x + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -2000000000:\\
\;\;\;\;\mathsf{fma}\left(b, a + -0.5, x + y\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-9}:\\
\;\;\;\;x + \left(z \cdot \left(1 - \log t\right) + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2e9Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.4%
associate-+r+91.4%
sub-neg91.4%
metadata-eval91.4%
*-commutative91.4%
+-commutative91.4%
*-commutative91.4%
fma-define91.4%
Simplified91.4%
if -2e9 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 5.0000000000000001e-9Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 98.9%
if 5.0000000000000001e-9 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in z around 0 92.0%
Final simplification94.6%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -2e+15) (fma b (+ a -0.5) (+ x y)) (- (+ y (+ z (* b (- a 0.5)))) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -2e+15) {
tmp = fma(b, (a + -0.5), (x + y));
} else {
tmp = (y + (z + (b * (a - 0.5)))) - (z * log(t));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -2e+15) tmp = fma(b, Float64(a + -0.5), Float64(x + y)); else tmp = Float64(Float64(y + Float64(z + Float64(b * Float64(a - 0.5)))) - Float64(z * log(t))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -2e+15], N[(b * N[(a + -0.5), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(y + N[(z + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(b, a + -0.5, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(z + b \cdot \left(a - 0.5\right)\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (+.f64 x y) < -2e15Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 88.7%
associate-+r+88.7%
sub-neg88.7%
metadata-eval88.7%
*-commutative88.7%
+-commutative88.7%
*-commutative88.7%
fma-define88.8%
Simplified88.8%
if -2e15 < (+.f64 x y) Initial program 99.9%
Taylor expanded in x around 0 78.3%
Final simplification82.8%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5));
}
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 = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (z * Math.log(t))) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z 1.65e+183) (fma b (+ a -0.5) (+ x y)) (* z (- 1.0 (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.65e+183) {
tmp = fma(b, (a + -0.5), (x + y));
} else {
tmp = z * (1.0 - log(t));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.65e+183) tmp = fma(b, Float64(a + -0.5), Float64(x + y)); else tmp = Float64(z * Float64(1.0 - log(t))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.65e+183], N[(b * N[(a + -0.5), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.65 \cdot 10^{+183}:\\
\;\;\;\;\mathsf{fma}\left(b, a + -0.5, x + y\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < 1.65000000000000005e183Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 88.3%
associate-+r+88.3%
sub-neg88.3%
metadata-eval88.3%
*-commutative88.3%
+-commutative88.3%
*-commutative88.3%
fma-define88.3%
Simplified88.3%
if 1.65000000000000005e183 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around inf 68.6%
associate--l+68.6%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in z around inf 40.7%
*-commutative40.7%
div-sub40.7%
associate-*r*66.0%
associate-*l/65.8%
Simplified65.8%
Taylor expanded in z around 0 66.0%
*-commutative66.0%
Simplified66.0%
Final simplification86.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z 1.55e+183) (+ (+ x y) (* b (- a 0.5))) (* z (- 1.0 (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.55e+183) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = z * (1.0 - log(t));
}
return tmp;
}
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) :: tmp
if (z <= 1.55d+183) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = z * (1.0d0 - log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.55e+183) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = z * (1.0 - Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 1.55e+183: tmp = (x + y) + (b * (a - 0.5)) else: tmp = z * (1.0 - math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.55e+183) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = Float64(z * Float64(1.0 - log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 1.55e+183) tmp = (x + y) + (b * (a - 0.5)); else tmp = z * (1.0 - log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.55e+183], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.55 \cdot 10^{+183}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < 1.5499999999999999e183Initial program 99.9%
Taylor expanded in z around 0 88.3%
if 1.5499999999999999e183 < z Initial program 99.6%
+-commutative99.6%
associate--l+99.6%
associate-+r+99.6%
+-commutative99.6%
*-lft-identity99.6%
metadata-eval99.6%
*-commutative99.6%
distribute-rgt-out--99.7%
metadata-eval99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in b around inf 68.6%
associate--l+68.6%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in z around inf 40.7%
*-commutative40.7%
div-sub40.7%
associate-*r*66.0%
associate-*l/65.8%
Simplified65.8%
Taylor expanded in z around 0 66.0%
*-commutative66.0%
Simplified66.0%
Final simplification86.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -5.5e+92)
x
(if (or (<= x -4.8e-273) (and (not (<= x 9.4e-173)) (<= x 2.2e+34)))
(* b (- a 0.5))
y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -5.5e+92) {
tmp = x;
} else if ((x <= -4.8e-273) || (!(x <= 9.4e-173) && (x <= 2.2e+34))) {
tmp = b * (a - 0.5);
} else {
tmp = y;
}
return tmp;
}
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) :: tmp
if (x <= (-5.5d+92)) then
tmp = x
else if ((x <= (-4.8d-273)) .or. (.not. (x <= 9.4d-173)) .and. (x <= 2.2d+34)) then
tmp = b * (a - 0.5d0)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -5.5e+92) {
tmp = x;
} else if ((x <= -4.8e-273) || (!(x <= 9.4e-173) && (x <= 2.2e+34))) {
tmp = b * (a - 0.5);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -5.5e+92: tmp = x elif (x <= -4.8e-273) or (not (x <= 9.4e-173) and (x <= 2.2e+34)): tmp = b * (a - 0.5) else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -5.5e+92) tmp = x; elseif ((x <= -4.8e-273) || (!(x <= 9.4e-173) && (x <= 2.2e+34))) tmp = Float64(b * Float64(a - 0.5)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -5.5e+92) tmp = x; elseif ((x <= -4.8e-273) || (~((x <= 9.4e-173)) && (x <= 2.2e+34))) tmp = b * (a - 0.5); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -5.5e+92], x, If[Or[LessEqual[x, -4.8e-273], And[N[Not[LessEqual[x, 9.4e-173]], $MachinePrecision], LessEqual[x, 2.2e+34]]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+92}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-273} \lor \neg \left(x \leq 9.4 \cdot 10^{-173}\right) \land x \leq 2.2 \cdot 10^{+34}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -5.50000000000000053e92Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 52.6%
if -5.50000000000000053e92 < x < -4.79999999999999963e-273 or 9.4000000000000001e-173 < x < 2.2000000000000002e34Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 45.4%
if -4.79999999999999963e-273 < x < 9.4000000000000001e-173 or 2.2000000000000002e34 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 29.1%
Final simplification40.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -4.2e+22)
(+ x (* -0.5 b))
(if (or (<= x -8e-275) (and (not (<= x 6e-170)) (<= x 1.05e+36)))
(* b (- a 0.5))
y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.2e+22) {
tmp = x + (-0.5 * b);
} else if ((x <= -8e-275) || (!(x <= 6e-170) && (x <= 1.05e+36))) {
tmp = b * (a - 0.5);
} else {
tmp = y;
}
return tmp;
}
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) :: tmp
if (x <= (-4.2d+22)) then
tmp = x + ((-0.5d0) * b)
else if ((x <= (-8d-275)) .or. (.not. (x <= 6d-170)) .and. (x <= 1.05d+36)) then
tmp = b * (a - 0.5d0)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.2e+22) {
tmp = x + (-0.5 * b);
} else if ((x <= -8e-275) || (!(x <= 6e-170) && (x <= 1.05e+36))) {
tmp = b * (a - 0.5);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.2e+22: tmp = x + (-0.5 * b) elif (x <= -8e-275) or (not (x <= 6e-170) and (x <= 1.05e+36)): tmp = b * (a - 0.5) else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.2e+22) tmp = Float64(x + Float64(-0.5 * b)); elseif ((x <= -8e-275) || (!(x <= 6e-170) && (x <= 1.05e+36))) tmp = Float64(b * Float64(a - 0.5)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.2e+22) tmp = x + (-0.5 * b); elseif ((x <= -8e-275) || (~((x <= 6e-170)) && (x <= 1.05e+36))) tmp = b * (a - 0.5); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.2e+22], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -8e-275], And[N[Not[LessEqual[x, 6e-170]], $MachinePrecision], LessEqual[x, 1.05e+36]]], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+22}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-275} \lor \neg \left(x \leq 6 \cdot 10^{-170}\right) \land x \leq 1.05 \cdot 10^{+36}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -4.1999999999999996e22Initial program 99.9%
Taylor expanded in x around inf 99.9%
associate--l+99.9%
associate--l+99.9%
div-sub99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
*-lft-identity99.9%
distribute-rgt-in99.9%
sub-neg99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 69.7%
Taylor expanded in a around 0 52.1%
*-commutative52.1%
Simplified52.1%
if -4.1999999999999996e22 < x < -7.99999999999999947e-275 or 6.00000000000000027e-170 < x < 1.05000000000000002e36Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 47.7%
if -7.99999999999999947e-275 < x < 6.00000000000000027e-170 or 1.05000000000000002e36 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 29.1%
Final simplification41.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y 1.1e+47) (and (not (<= y 1.45e+86)) (<= y 2.9e+190))) (+ x (* b (- a 0.5))) (+ y (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= 1.1e+47) || (!(y <= 1.45e+86) && (y <= 2.9e+190))) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
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) :: tmp
if ((y <= 1.1d+47) .or. (.not. (y <= 1.45d+86)) .and. (y <= 2.9d+190)) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + ((-0.5d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= 1.1e+47) || (!(y <= 1.45e+86) && (y <= 2.9e+190))) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= 1.1e+47) or (not (y <= 1.45e+86) and (y <= 2.9e+190)): tmp = x + (b * (a - 0.5)) else: tmp = y + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= 1.1e+47) || (!(y <= 1.45e+86) && (y <= 2.9e+190))) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= 1.1e+47) || (~((y <= 1.45e+86)) && (y <= 2.9e+190))) tmp = x + (b * (a - 0.5)); else tmp = y + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, 1.1e+47], And[N[Not[LessEqual[y, 1.45e+86]], $MachinePrecision], LessEqual[y, 2.9e+190]]], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.1 \cdot 10^{+47} \lor \neg \left(y \leq 1.45 \cdot 10^{+86}\right) \land y \leq 2.9 \cdot 10^{+190}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if y < 1.1e47 or 1.44999999999999995e86 < y < 2.89999999999999989e190Initial program 99.9%
Taylor expanded in x around inf 87.3%
associate--l+87.3%
associate--l+87.3%
div-sub87.4%
*-commutative87.4%
cancel-sign-sub-inv87.4%
*-lft-identity87.4%
distribute-rgt-in87.4%
sub-neg87.4%
associate-/l*87.4%
Simplified87.4%
Taylor expanded in x around inf 64.3%
if 1.1e47 < y < 1.44999999999999995e86 or 2.89999999999999989e190 < y Initial program 99.9%
Taylor expanded in x around inf 77.3%
associate--l+77.3%
associate--l+77.3%
div-sub77.8%
*-commutative77.8%
cancel-sign-sub-inv77.8%
*-lft-identity77.8%
distribute-rgt-in77.8%
sub-neg77.8%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in y around inf 83.4%
Taylor expanded in a around 0 75.2%
*-commutative75.2%
Simplified75.2%
Final simplification65.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.8e+22) (+ x (* -0.5 b)) (if (<= x -2.15e-265) (* b (- a 0.5)) (+ y (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.8e+22) {
tmp = x + (-0.5 * b);
} else if (x <= -2.15e-265) {
tmp = b * (a - 0.5);
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
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) :: tmp
if (x <= (-2.8d+22)) then
tmp = x + ((-0.5d0) * b)
else if (x <= (-2.15d-265)) then
tmp = b * (a - 0.5d0)
else
tmp = y + ((-0.5d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.8e+22) {
tmp = x + (-0.5 * b);
} else if (x <= -2.15e-265) {
tmp = b * (a - 0.5);
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.8e+22: tmp = x + (-0.5 * b) elif x <= -2.15e-265: tmp = b * (a - 0.5) else: tmp = y + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.8e+22) tmp = Float64(x + Float64(-0.5 * b)); elseif (x <= -2.15e-265) tmp = Float64(b * Float64(a - 0.5)); else tmp = Float64(y + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.8e+22) tmp = x + (-0.5 * b); elseif (x <= -2.15e-265) tmp = b * (a - 0.5); else tmp = y + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.8e+22], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.15e-265], N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+22}:\\
\;\;\;\;x + -0.5 \cdot b\\
\mathbf{elif}\;x \leq -2.15 \cdot 10^{-265}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if x < -2.8e22Initial program 99.9%
Taylor expanded in x around inf 99.9%
associate--l+99.9%
associate--l+99.9%
div-sub99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
*-lft-identity99.9%
distribute-rgt-in99.9%
sub-neg99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 69.7%
Taylor expanded in a around 0 52.1%
*-commutative52.1%
Simplified52.1%
if -2.8e22 < x < -2.1500000000000001e-265Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 50.5%
if -2.1500000000000001e-265 < x Initial program 99.9%
Taylor expanded in x around inf 83.5%
associate--l+83.5%
associate--l+83.5%
div-sub83.7%
*-commutative83.7%
cancel-sign-sub-inv83.7%
*-lft-identity83.7%
distribute-rgt-in83.7%
sub-neg83.7%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in y around inf 62.4%
Taylor expanded in a around 0 39.9%
*-commutative39.9%
Simplified39.9%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.02e+14) x (if (<= x -2.1e-270) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.02e+14) {
tmp = x;
} else if (x <= -2.1e-270) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
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) :: tmp
if (x <= (-1.02d+14)) then
tmp = x
else if (x <= (-2.1d-270)) then
tmp = a * b
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.02e+14) {
tmp = x;
} else if (x <= -2.1e-270) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.02e+14: tmp = x elif x <= -2.1e-270: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.02e+14) tmp = x; elseif (x <= -2.1e-270) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.02e+14) tmp = x; elseif (x <= -2.1e-270) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.02e+14], x, If[LessEqual[x, -2.1e-270], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-270}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.02e14Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 45.2%
if -1.02e14 < x < -2.09999999999999996e-270Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 34.3%
*-commutative34.3%
Simplified34.3%
if -2.09999999999999996e-270 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 30.6%
Final simplification35.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= x -2.7e+15) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (x <= -2.7e+15) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
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 = b * (a - 0.5d0)
if (x <= (-2.7d+15)) then
tmp = x + t_1
else
tmp = y + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (x <= -2.7e+15) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if x <= -2.7e+15: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (x <= -2.7e+15) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (x <= -2.7e+15) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.7e+15], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x \leq -2.7 \cdot 10^{+15}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if x < -2.7e15Initial program 99.9%
Taylor expanded in x around inf 99.9%
associate--l+99.9%
associate--l+99.9%
div-sub99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
*-lft-identity99.9%
distribute-rgt-in99.9%
sub-neg99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 70.6%
if -2.7e15 < x Initial program 99.9%
Taylor expanded in x around inf 80.9%
associate--l+80.9%
associate--l+80.9%
div-sub81.2%
*-commutative81.2%
cancel-sign-sub-inv81.2%
*-lft-identity81.2%
distribute-rgt-in81.2%
sub-neg81.2%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in y around inf 64.9%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (+ (+ x y) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * (a - 0.5));
}
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 + y) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (x + y) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + y) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
Taylor expanded in z around 0 83.9%
Final simplification83.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4800000.0) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4800000.0) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
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) :: tmp
if (x <= (-4800000.0d0)) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4800000.0) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4800000.0: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4800000.0) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4800000.0) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4800000.0], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4800000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -4.8e6Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 44.0%
if -4.8e6 < x Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 29.4%
Final simplification33.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 25.8%
Final simplification25.8%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * 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 + y) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2024066
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))