
(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 16 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))) (+ (+ x y) (* (+ a -0.5) b))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - log(t))) + ((x + y) + ((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 = (z * (1.0d0 - log(t))) + ((x + y) + ((a + (-0.5d0)) * b))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z * (1.0 - Math.log(t))) + ((x + y) + ((a + -0.5) * b));
}
def code(x, y, z, t, a, b): return (z * (1.0 - math.log(t))) + ((x + y) + ((a + -0.5) * b))
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(1.0 - log(t))) + Float64(Float64(x + y) + Float64(Float64(a + -0.5) * b))) end
function tmp = code(x, y, z, t, a, b) tmp = (z * (1.0 - log(t))) + ((x + y) + ((a + -0.5) * b)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(1 - \log t\right) + \left(\left(x + y\right) + \left(a + -0.5\right) \cdot b\right)
\end{array}
Initial program 99.9%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))) (t_2 (+ (+ x y) t_1)))
(if (<= t_1 -2e+57)
t_2
(if (<= t_1 2e+34) (+ x (+ (* z (- 1.0 (log t))) y)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double t_2 = (x + y) + t_1;
double tmp;
if (t_1 <= -2e+57) {
tmp = t_2;
} else if (t_1 <= 2e+34) {
tmp = x + ((z * (1.0 - log(t))) + y);
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = b * (a - 0.5d0)
t_2 = (x + y) + t_1
if (t_1 <= (-2d+57)) then
tmp = t_2
else if (t_1 <= 2d+34) then
tmp = x + ((z * (1.0d0 - log(t))) + y)
else
tmp = t_2
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 t_2 = (x + y) + t_1;
double tmp;
if (t_1 <= -2e+57) {
tmp = t_2;
} else if (t_1 <= 2e+34) {
tmp = x + ((z * (1.0 - Math.log(t))) + y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) t_2 = (x + y) + t_1 tmp = 0 if t_1 <= -2e+57: tmp = t_2 elif t_1 <= 2e+34: tmp = x + ((z * (1.0 - math.log(t))) + y) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) t_2 = Float64(Float64(x + y) + t_1) tmp = 0.0 if (t_1 <= -2e+57) tmp = t_2; elseif (t_1 <= 2e+34) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - log(t))) + y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); t_2 = (x + y) + t_1; tmp = 0.0; if (t_1 <= -2e+57) tmp = t_2; elseif (t_1 <= 2e+34) tmp = x + ((z * (1.0 - log(t))) + y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+57], t$95$2, If[LessEqual[t$95$1, 2e+34], N[(x + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
t_2 := \left(x + y\right) + t\_1\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+57}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+34}:\\
\;\;\;\;x + \left(z \cdot \left(1 - \log t\right) + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -2.0000000000000001e57 or 1.99999999999999989e34 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.9%
Taylor expanded in z around 0
+-lowering-+.f6490.8%
Simplified90.8%
if -2.0000000000000001e57 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1.99999999999999989e34Initial program 99.8%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6491.7%
Simplified91.7%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (- (+ z y) (* z (log t))) (* a b))))
(if (<= z -5.5e+98)
t_1
(if (<= z 3.1e+155) (+ (+ x y) (* b (- a 0.5))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z + y) - (z * log(t))) + (a * b);
double tmp;
if (z <= -5.5e+98) {
tmp = t_1;
} else if (z <= 3.1e+155) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = 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 = ((z + y) - (z * log(t))) + (a * b)
if (z <= (-5.5d+98)) then
tmp = t_1
else if (z <= 3.1d+155) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = 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 = ((z + y) - (z * Math.log(t))) + (a * b);
double tmp;
if (z <= -5.5e+98) {
tmp = t_1;
} else if (z <= 3.1e+155) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z + y) - (z * math.log(t))) + (a * b) tmp = 0 if z <= -5.5e+98: tmp = t_1 elif z <= 3.1e+155: tmp = (x + y) + (b * (a - 0.5)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z + y) - Float64(z * log(t))) + Float64(a * b)) tmp = 0.0 if (z <= -5.5e+98) tmp = t_1; elseif (z <= 3.1e+155) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z + y) - (z * log(t))) + (a * b); tmp = 0.0; if (z <= -5.5e+98) tmp = t_1; elseif (z <= 3.1e+155) tmp = (x + y) + (b * (a - 0.5)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+98], t$95$1, If[LessEqual[z, 3.1e+155], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(z + y\right) - z \cdot \log t\right) + a \cdot b\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+155}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.49999999999999946e98 or 3.09999999999999989e155 < z Initial program 99.6%
Taylor expanded in x around 0
+-lowering-+.f6490.6%
Simplified90.6%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6484.8%
Simplified84.8%
if -5.49999999999999946e98 < z < 3.09999999999999989e155Initial program 100.0%
Taylor expanded in z around 0
+-lowering-+.f6496.7%
Simplified96.7%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= (+ x y) -5e+106)
(+ (+ x y) t_1)
(+ t_1 (- (+ z y) (* z (log t)))))))
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 + y) <= -5e+106) {
tmp = (x + y) + t_1;
} else {
tmp = t_1 + ((z + y) - (z * 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((x + y) <= (-5d+106)) then
tmp = (x + y) + t_1
else
tmp = t_1 + ((z + y) - (z * 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 t_1 = b * (a - 0.5);
double tmp;
if ((x + y) <= -5e+106) {
tmp = (x + y) + t_1;
} else {
tmp = t_1 + ((z + y) - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= -5e+106: tmp = (x + y) + t_1 else: tmp = t_1 + ((z + y) - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(x + y) <= -5e+106) tmp = Float64(Float64(x + y) + t_1); else tmp = Float64(t_1 + Float64(Float64(z + y) - Float64(z * log(t)))); 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 + y) <= -5e+106) tmp = (x + y) + t_1; else tmp = t_1 + ((z + y) - (z * log(t))); 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[N[(x + y), $MachinePrecision], -5e+106], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(z + y), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq -5 \cdot 10^{+106}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(\left(z + y\right) - z \cdot \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -4.9999999999999998e106Initial program 99.9%
Taylor expanded in z around 0
+-lowering-+.f6492.0%
Simplified92.0%
if -4.9999999999999998e106 < (+.f64 x y) Initial program 99.8%
Taylor expanded in x around 0
+-lowering-+.f6487.0%
Simplified87.0%
Final simplification88.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= z -2.3e+100)
(+ t_1 (- z (* z (log t))))
(if (<= z 1.16e+157) (+ (+ x y) t_1) (+ x (+ (* z (- 1.0 (log t))) y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (z <= -2.3e+100) {
tmp = t_1 + (z - (z * log(t)));
} else if (z <= 1.16e+157) {
tmp = (x + y) + t_1;
} else {
tmp = x + ((z * (1.0 - log(t))) + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if (z <= (-2.3d+100)) then
tmp = t_1 + (z - (z * log(t)))
else if (z <= 1.16d+157) then
tmp = (x + y) + t_1
else
tmp = x + ((z * (1.0d0 - log(t))) + y)
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 (z <= -2.3e+100) {
tmp = t_1 + (z - (z * Math.log(t)));
} else if (z <= 1.16e+157) {
tmp = (x + y) + t_1;
} else {
tmp = x + ((z * (1.0 - Math.log(t))) + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if z <= -2.3e+100: tmp = t_1 + (z - (z * math.log(t))) elif z <= 1.16e+157: tmp = (x + y) + t_1 else: tmp = x + ((z * (1.0 - math.log(t))) + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (z <= -2.3e+100) tmp = Float64(t_1 + Float64(z - Float64(z * log(t)))); elseif (z <= 1.16e+157) tmp = Float64(Float64(x + y) + t_1); else tmp = Float64(x + Float64(Float64(z * Float64(1.0 - log(t))) + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (z <= -2.3e+100) tmp = t_1 + (z - (z * log(t))); elseif (z <= 1.16e+157) tmp = (x + y) + t_1; else tmp = x + ((z * (1.0 - log(t))) + y); 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[z, -2.3e+100], N[(t$95$1 + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.16e+157], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+100}:\\
\;\;\;\;t\_1 + \left(z - z \cdot \log t\right)\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+157}:\\
\;\;\;\;\left(x + y\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(1 - \log t\right) + y\right)\\
\end{array}
\end{array}
if z < -2.2999999999999999e100Initial program 99.4%
Taylor expanded in z around inf
Simplified81.2%
if -2.2999999999999999e100 < z < 1.16000000000000004e157Initial program 100.0%
Taylor expanded in z around 0
+-lowering-+.f6496.7%
Simplified96.7%
if 1.16000000000000004e157 < z Initial program 99.8%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6479.5%
Simplified79.5%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (- 1.0 (log t))) y)))
(if (<= z -4.5e+216)
t_1
(if (<= z 1.4e+157) (+ (+ x y) (* b (- a 0.5))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * (1.0 - log(t))) + y;
double tmp;
if (z <= -4.5e+216) {
tmp = t_1;
} else if (z <= 1.4e+157) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = 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 = (z * (1.0d0 - log(t))) + y
if (z <= (-4.5d+216)) then
tmp = t_1
else if (z <= 1.4d+157) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = 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 = (z * (1.0 - Math.log(t))) + y;
double tmp;
if (z <= -4.5e+216) {
tmp = t_1;
} else if (z <= 1.4e+157) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * (1.0 - math.log(t))) + y tmp = 0 if z <= -4.5e+216: tmp = t_1 elif z <= 1.4e+157: tmp = (x + y) + (b * (a - 0.5)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(1.0 - log(t))) + y) tmp = 0.0 if (z <= -4.5e+216) tmp = t_1; elseif (z <= 1.4e+157) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * (1.0 - log(t))) + y; tmp = 0.0; if (z <= -4.5e+216) tmp = t_1; elseif (z <= 1.4e+157) tmp = (x + y) + (b * (a - 0.5)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[z, -4.5e+216], t$95$1, If[LessEqual[z, 1.4e+157], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right) + y\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+157}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.50000000000000025e216 or 1.4000000000000001e157 < z Initial program 99.6%
Taylor expanded in x around 0
+-lowering-+.f6492.4%
Simplified92.4%
Taylor expanded in b around 0
associate--l+N/A
+-commutativeN/A
*-commutativeN/A
cancel-sign-sub-invN/A
log-recN/A
*-commutativeN/A
sum3-undefineN/A
*-rgt-identityN/A
sum3-defineN/A
distribute-lft-inN/A
log-recN/A
sub-negN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6471.3%
Simplified71.3%
if -4.50000000000000025e216 < z < 1.4000000000000001e157Initial program 99.9%
Taylor expanded in z around 0
+-lowering-+.f6492.8%
Simplified92.8%
Final simplification88.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.7e+222)
t_1
(if (<= z 3.8e+229) (+ (+ x y) (* b (- a 0.5))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -2.7e+222) {
tmp = t_1;
} else if (z <= 3.8e+229) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = 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 = z * (1.0d0 - log(t))
if (z <= (-2.7d+222)) then
tmp = t_1
else if (z <= 3.8d+229) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = 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 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2.7e+222) {
tmp = t_1;
} else if (z <= 3.8e+229) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2.7e+222: tmp = t_1 elif z <= 3.8e+229: tmp = (x + y) + (b * (a - 0.5)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -2.7e+222) tmp = t_1; elseif (z <= 3.8e+229) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -2.7e+222) tmp = t_1; elseif (z <= 3.8e+229) tmp = (x + y) + (b * (a - 0.5)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+222], t$95$1, If[LessEqual[z, 3.8e+229], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+229}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.70000000000000013e222 or 3.80000000000000018e229 < z Initial program 99.5%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6471.9%
Simplified71.9%
if -2.70000000000000013e222 < z < 3.80000000000000018e229Initial program 99.9%
Taylor expanded in z around 0
+-lowering-+.f6488.2%
Simplified88.2%
Final simplification86.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9e+155) x (if (<= x 4.8e-152) (* (+ a -0.5) b) (+ y (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9e+155) {
tmp = x;
} else if (x <= 4.8e-152) {
tmp = (a + -0.5) * b;
} 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 <= (-9d+155)) then
tmp = x
else if (x <= 4.8d-152) then
tmp = (a + (-0.5d0)) * b
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 <= -9e+155) {
tmp = x;
} else if (x <= 4.8e-152) {
tmp = (a + -0.5) * b;
} else {
tmp = y + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9e+155: tmp = x elif x <= 4.8e-152: tmp = (a + -0.5) * b else: tmp = y + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9e+155) tmp = x; elseif (x <= 4.8e-152) tmp = Float64(Float64(a + -0.5) * b); 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 <= -9e+155) tmp = x; elseif (x <= 4.8e-152) tmp = (a + -0.5) * b; else tmp = y + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9e+155], x, If[LessEqual[x, 4.8e-152], N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision], N[(y + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-152}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + -0.5 \cdot b\\
\end{array}
\end{array}
if x < -8.99999999999999947e155Initial program 100.0%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified63.7%
if -8.99999999999999947e155 < x < 4.8e-152Initial program 99.8%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6442.5%
Simplified42.5%
if 4.8e-152 < x Initial program 99.9%
Taylor expanded in y around inf
Simplified65.6%
Taylor expanded in a around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6437.4%
Simplified37.4%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9.5e+155) x (if (<= x 13500000.0) (* (+ a -0.5) b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.5e+155) {
tmp = x;
} else if (x <= 13500000.0) {
tmp = (a + -0.5) * 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 <= (-9.5d+155)) then
tmp = x
else if (x <= 13500000.0d0) then
tmp = (a + (-0.5d0)) * 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 <= -9.5e+155) {
tmp = x;
} else if (x <= 13500000.0) {
tmp = (a + -0.5) * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9.5e+155: tmp = x elif x <= 13500000.0: tmp = (a + -0.5) * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9.5e+155) tmp = x; elseif (x <= 13500000.0) tmp = Float64(Float64(a + -0.5) * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -9.5e+155) tmp = x; elseif (x <= 13500000.0) tmp = (a + -0.5) * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.5e+155], x, If[LessEqual[x, 13500000.0], N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 13500000:\\
\;\;\;\;\left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -9.5000000000000006e155Initial program 100.0%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified63.7%
if -9.5000000000000006e155 < x < 1.35e7Initial program 99.8%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6446.1%
Simplified46.1%
if 1.35e7 < x Initial program 99.9%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf
Simplified18.3%
Final simplification41.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.6e+155) x (if (<= x 1.55e-151) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.6e+155) {
tmp = x;
} else if (x <= 1.55e-151) {
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 <= (-4.6d+155)) then
tmp = x
else if (x <= 1.55d-151) 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 <= -4.6e+155) {
tmp = x;
} else if (x <= 1.55e-151) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.6e+155: tmp = x elif x <= 1.55e-151: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.6e+155) tmp = x; elseif (x <= 1.55e-151) 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 <= -4.6e+155) tmp = x; elseif (x <= 1.55e-151) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.6e+155], x, If[LessEqual[x, 1.55e-151], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+155}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-151}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -4.59999999999999996e155Initial program 100.0%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified63.7%
if -4.59999999999999996e155 < x < 1.54999999999999992e-151Initial program 99.8%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6432.6%
Simplified32.6%
if 1.54999999999999992e-151 < x Initial program 99.9%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf
Simplified20.9%
Final simplification31.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= x -2.15e+101) (+ 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.15e+101) {
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.15d+101)) 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.15e+101) {
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.15e+101: 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.15e+101) 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.15e+101) 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.15e+101], 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.15 \cdot 10^{+101}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if x < -2.15e101Initial program 100.0%
Taylor expanded in x around inf
Simplified74.7%
if -2.15e101 < x Initial program 99.8%
Taylor expanded in y around inf
Simplified68.8%
Final simplification69.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.12e+72) (+ x (* b (- a 0.5))) (+ y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.12e+72) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (a * 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.12d+72) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + (a * 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.12e+72) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.12e+72: tmp = x + (b * (a - 0.5)) else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.12e+72) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.12e+72) tmp = x + (b * (a - 0.5)); else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.12e+72], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.12 \cdot 10^{+72}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if y < 1.12000000000000001e72Initial program 99.9%
Taylor expanded in x around inf
Simplified63.0%
if 1.12000000000000001e72 < y Initial program 99.9%
Taylor expanded in y around inf
Simplified82.1%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6476.8%
Simplified76.8%
Final simplification66.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.12e+156) x (+ y (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.12e+156) {
tmp = x;
} else {
tmp = y + (a * 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 <= (-1.12d+156)) then
tmp = x
else
tmp = y + (a * 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 <= -1.12e+156) {
tmp = x;
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.12e+156: tmp = x else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.12e+156) tmp = x; else tmp = Float64(y + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.12e+156) tmp = x; else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.12e+156], x, N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{+156}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if x < -1.12000000000000007e156Initial program 100.0%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified63.7%
if -1.12000000000000007e156 < x Initial program 99.8%
Taylor expanded in y around inf
Simplified67.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6454.9%
Simplified54.9%
Final simplification55.9%
(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
+-lowering-+.f6481.0%
Simplified81.0%
Final simplification81.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1e+113) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1e+113) {
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 <= (-1d+113)) 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 <= -1e+113) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1e+113: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1e+113) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1e+113) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1e+113], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1e113Initial program 100.0%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified59.6%
if -1e113 < x Initial program 99.8%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf
Simplified24.9%
(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%
+-commutativeN/A
associate--l+N/A
associate-+r+N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
cancel-sign-sub-invN/A
distribute-rgt1-inN/A
*-commutativeN/A
*-lowering-*.f64N/A
+-commutativeN/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
+-lowering-+.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf
Simplified19.0%
(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 2024161
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))