
(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.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%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -4e+101)
(+ t_1 (- y (* z (log t))))
(if (<= t_1 1e+21) (+ 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 <= -4e+101) {
tmp = t_1 + (y - (z * log(t)));
} else if (t_1 <= 1e+21) {
tmp = x + ((z * (1.0 - log(t))) + y);
} else {
tmp = (x + 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 (t_1 <= (-4d+101)) then
tmp = t_1 + (y - (z * log(t)))
else if (t_1 <= 1d+21) then
tmp = x + ((z * (1.0d0 - log(t))) + y)
else
tmp = (x + 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 (t_1 <= -4e+101) {
tmp = t_1 + (y - (z * Math.log(t)));
} else if (t_1 <= 1e+21) {
tmp = x + ((z * (1.0 - Math.log(t))) + y);
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if t_1 <= -4e+101: tmp = t_1 + (y - (z * math.log(t))) elif t_1 <= 1e+21: tmp = x + ((z * (1.0 - math.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 <= -4e+101) tmp = Float64(t_1 + Float64(y - Float64(z * log(t)))); elseif (t_1 <= 1e+21) tmp = Float64(x + Float64(Float64(z * Float64(1.0 - log(t))) + y)); else tmp = Float64(Float64(x + 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 (t_1 <= -4e+101) tmp = t_1 + (y - (z * log(t))); elseif (t_1 <= 1e+21) tmp = x + ((z * (1.0 - log(t))) + y); else tmp = (x + 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[t$95$1, -4e+101], N[(t$95$1 + N[(y - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+21], 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 -4 \cdot 10^{+101}:\\
\;\;\;\;t\_1 + \left(y - z \cdot \log t\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+21}:\\
\;\;\;\;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) < -3.9999999999999999e101Initial program 100.0%
Taylor expanded in y around inf
Simplified86.2%
if -3.9999999999999999e101 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e21Initial 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 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6496.7%
Simplified96.7%
if 1e21 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 98.7%
Taylor expanded in z around 0
+-lowering-+.f6491.0%
Simplified91.0%
Final simplification92.8%
(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 -4e+101)
t_2
(if (<= t_1 1e+21) (+ 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 <= -4e+101) {
tmp = t_2;
} else if (t_1 <= 1e+21) {
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 <= (-4d+101)) then
tmp = t_2
else if (t_1 <= 1d+21) 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 <= -4e+101) {
tmp = t_2;
} else if (t_1 <= 1e+21) {
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 <= -4e+101: tmp = t_2 elif t_1 <= 1e+21: 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 <= -4e+101) tmp = t_2; elseif (t_1 <= 1e+21) 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 <= -4e+101) tmp = t_2; elseif (t_1 <= 1e+21) 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, -4e+101], t$95$2, If[LessEqual[t$95$1, 1e+21], 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 -4 \cdot 10^{+101}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+21}:\\
\;\;\;\;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) < -3.9999999999999999e101 or 1e21 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 99.2%
Taylor expanded in z around 0
+-lowering-+.f6491.6%
Simplified91.6%
if -3.9999999999999999e101 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e21Initial 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 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6496.7%
Simplified96.7%
Final simplification94.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x y) (* b (- a 0.5)))))
(if (<= b -3.9e+86)
t_1
(if (<= b 1.9e+81) (+ (- (+ z (+ x y)) (* z (log t))) (* a b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + (b * (a - 0.5));
double tmp;
if (b <= -3.9e+86) {
tmp = t_1;
} else if (b <= 1.9e+81) {
tmp = ((z + (x + y)) - (z * log(t))) + (a * b);
} 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 = (x + y) + (b * (a - 0.5d0))
if (b <= (-3.9d+86)) then
tmp = t_1
else if (b <= 1.9d+81) then
tmp = ((z + (x + y)) - (z * log(t))) + (a * b)
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 = (x + y) + (b * (a - 0.5));
double tmp;
if (b <= -3.9e+86) {
tmp = t_1;
} else if (b <= 1.9e+81) {
tmp = ((z + (x + y)) - (z * Math.log(t))) + (a * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + y) + (b * (a - 0.5)) tmp = 0 if b <= -3.9e+86: tmp = t_1 elif b <= 1.9e+81: tmp = ((z + (x + y)) - (z * math.log(t))) + (a * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))) tmp = 0.0 if (b <= -3.9e+86) tmp = t_1; elseif (b <= 1.9e+81) tmp = Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(a * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + y) + (b * (a - 0.5)); tmp = 0.0; if (b <= -3.9e+86) tmp = t_1; elseif (b <= 1.9e+81) tmp = ((z + (x + y)) - (z * log(t))) + (a * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.9e+86], t$95$1, If[LessEqual[b, 1.9e+81], N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;b \leq -3.9 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+81}:\\
\;\;\;\;\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.9000000000000002e86 or 1.9e81 < b Initial program 98.8%
Taylor expanded in z around 0
+-lowering-+.f6496.5%
Simplified96.5%
if -3.9000000000000002e86 < b < 1.9e81Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6497.6%
Simplified97.6%
Final simplification97.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (- 1.0 (log t))) y)))
(if (<= z -5.5e+172)
t_1
(if (<= z 4.2e+107) (+ (+ 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 <= -5.5e+172) {
tmp = t_1;
} else if (z <= 4.2e+107) {
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 <= (-5.5d+172)) then
tmp = t_1
else if (z <= 4.2d+107) 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 <= -5.5e+172) {
tmp = t_1;
} else if (z <= 4.2e+107) {
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 <= -5.5e+172: tmp = t_1 elif z <= 4.2e+107: 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 <= -5.5e+172) tmp = t_1; elseif (z <= 4.2e+107) 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 <= -5.5e+172) tmp = t_1; elseif (z <= 4.2e+107) 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, -5.5e+172], t$95$1, If[LessEqual[z, 4.2e+107], 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 -5.5 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+107}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.4999999999999999e172 or 4.1999999999999999e107 < z Initial program 98.2%
+-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-eval98.2%
Simplified98.2%
Taylor expanded in b around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6476.1%
Simplified76.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6460.7%
Simplified60.7%
if -5.4999999999999999e172 < z < 4.1999999999999999e107Initial program 100.0%
Taylor expanded in z around 0
+-lowering-+.f6494.4%
Simplified94.4%
Final simplification85.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (- 1.0 (log t))) x)))
(if (<= z -4.9e+174)
t_1
(if (<= z 3.7e+204) (+ (+ 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))) + x;
double tmp;
if (z <= -4.9e+174) {
tmp = t_1;
} else if (z <= 3.7e+204) {
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))) + x
if (z <= (-4.9d+174)) then
tmp = t_1
else if (z <= 3.7d+204) 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))) + x;
double tmp;
if (z <= -4.9e+174) {
tmp = t_1;
} else if (z <= 3.7e+204) {
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))) + x tmp = 0 if z <= -4.9e+174: tmp = t_1 elif z <= 3.7e+204: 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))) + x) tmp = 0.0 if (z <= -4.9e+174) tmp = t_1; elseif (z <= 3.7e+204) 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))) + x; tmp = 0.0; if (z <= -4.9e+174) tmp = t_1; elseif (z <= 3.7e+204) 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] + x), $MachinePrecision]}, If[LessEqual[z, -4.9e+174], t$95$1, If[LessEqual[z, 3.7e+204], 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) + x\\
\mathbf{if}\;z \leq -4.9 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+204}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8999999999999997e174 or 3.7e204 < z Initial program 97.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-eval97.6%
Simplified97.6%
Taylor expanded in b around 0
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6472.7%
Simplified72.7%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6465.4%
Simplified65.4%
if -4.8999999999999997e174 < z < 3.7e204Initial program 99.9%
Taylor expanded in z around 0
+-lowering-+.f6491.8%
Simplified91.8%
Final simplification86.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z 3.8e+204) (+ (+ 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 <= 3.8e+204) {
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 <= 3.8d+204) 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 <= 3.8e+204) {
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 <= 3.8e+204: 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 <= 3.8e+204) 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 <= 3.8e+204) 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, 3.8e+204], 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 3.8 \cdot 10^{+204}:\\
\;\;\;\;\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 < 3.7999999999999998e204Initial program 99.9%
Taylor expanded in z around 0
+-lowering-+.f6486.4%
Simplified86.4%
if 3.7999999999999998e204 < z Initial program 95.4%
+-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-eval95.4%
Simplified95.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6460.2%
Simplified60.2%
Final simplification84.0%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) -5e-49) (+ x (* a b)) (if (<= (+ x y) 1e-144) (* (+ a -0.5) b) (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x + y) <= -5e-49) {
tmp = x + (a * b);
} else if ((x + y) <= 1e-144) {
tmp = (a + -0.5) * b;
} 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 + y) <= (-5d-49)) then
tmp = x + (a * b)
else if ((x + y) <= 1d-144) then
tmp = (a + (-0.5d0)) * b
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 + y) <= -5e-49) {
tmp = x + (a * b);
} else if ((x + y) <= 1e-144) {
tmp = (a + -0.5) * b;
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= -5e-49: tmp = x + (a * b) elif (x + y) <= 1e-144: tmp = (a + -0.5) * b else: tmp = y + (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(x + y) <= -5e-49) tmp = Float64(x + Float64(a * b)); elseif (Float64(x + y) <= 1e-144) tmp = Float64(Float64(a + -0.5) * b); 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 + y) <= -5e-49) tmp = x + (a * b); elseif ((x + y) <= 1e-144) tmp = (a + -0.5) * b; else tmp = y + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(x + y), $MachinePrecision], -5e-49], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e-144], N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision], N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -5 \cdot 10^{-49}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;x + y \leq 10^{-144}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < -4.9999999999999999e-49Initial program 99.9%
Taylor expanded in x around inf
Simplified61.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6450.0%
Simplified50.0%
if -4.9999999999999999e-49 < (+.f64 x y) < 9.9999999999999995e-145Initial 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-+.f6451.3%
Simplified51.3%
if 9.9999999999999995e-145 < (+.f64 x y) Initial program 99.1%
+-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.1%
Simplified99.1%
Taylor expanded in b around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified75.1%
Taylor expanded in y around inf
/-lowering-/.f6446.0%
Simplified46.0%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6453.2%
Simplified53.2%
Final simplification51.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (+ a -0.5) b))) (if (<= b -1.05e+21) t_1 (if (<= b 2.5e-9) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + -0.5) * b;
double tmp;
if (b <= -1.05e+21) {
tmp = t_1;
} else if (b <= 2.5e-9) {
tmp = x + y;
} 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 = (a + (-0.5d0)) * b
if (b <= (-1.05d+21)) then
tmp = t_1
else if (b <= 2.5d-9) then
tmp = x + y
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 = (a + -0.5) * b;
double tmp;
if (b <= -1.05e+21) {
tmp = t_1;
} else if (b <= 2.5e-9) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + -0.5) * b tmp = 0 if b <= -1.05e+21: tmp = t_1 elif b <= 2.5e-9: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + -0.5) * b) tmp = 0.0 if (b <= -1.05e+21) tmp = t_1; elseif (b <= 2.5e-9) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + -0.5) * b; tmp = 0.0; if (b <= -1.05e+21) tmp = t_1; elseif (b <= 2.5e-9) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.05e+21], t$95$1, If[LessEqual[b, 2.5e-9], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + -0.5\right) \cdot b\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{-9}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.05e21 or 2.5000000000000001e-9 < b Initial program 99.1%
+-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.1%
Simplified99.1%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6472.0%
Simplified72.0%
if -1.05e21 < b < 2.5000000000000001e-9Initial 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.f6494.1%
Simplified94.1%
Taylor expanded in z around 0
+-lowering-+.f6470.2%
Simplified70.2%
Final simplification71.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) -5e-49) (+ 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 + y) <= -5e-49) {
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 + y) <= (-5d-49)) 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 + y) <= -5e-49) {
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 + y) <= -5e-49: 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 (Float64(x + y) <= -5e-49) 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 + y) <= -5e-49) 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[N[(x + y), $MachinePrecision], -5e-49], 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 + y \leq -5 \cdot 10^{-49}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if (+.f64 x y) < -4.9999999999999999e-49Initial program 99.9%
Taylor expanded in x around inf
Simplified61.0%
if -4.9999999999999999e-49 < (+.f64 x y) Initial program 99.2%
Taylor expanded in y around inf
Simplified59.0%
Final simplification59.7%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ x y) 1e-144) (+ 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 ((x + y) <= 1e-144) {
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 ((x + y) <= 1d-144) 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 ((x + y) <= 1e-144) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x + y) <= 1e-144: 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 (Float64(x + y) <= 1e-144) 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 ((x + y) <= 1e-144) 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[N[(x + y), $MachinePrecision], 1e-144], 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}\;x + y \leq 10^{-144}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + a \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < 9.9999999999999995e-145Initial program 99.9%
Taylor expanded in x around inf
Simplified58.6%
if 9.9999999999999995e-145 < (+.f64 x y) Initial program 99.1%
+-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.1%
Simplified99.1%
Taylor expanded in b around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
Simplified75.1%
Taylor expanded in y around inf
/-lowering-/.f6446.0%
Simplified46.0%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6453.2%
Simplified53.2%
Final simplification55.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.8e+114) (* a b) (if (<= b 1.95e-10) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.8e+114) {
tmp = a * b;
} else if (b <= 1.95e-10) {
tmp = x + y;
} else {
tmp = 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 (b <= (-6.8d+114)) then
tmp = a * b
else if (b <= 1.95d-10) then
tmp = x + y
else
tmp = 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 (b <= -6.8e+114) {
tmp = a * b;
} else if (b <= 1.95e-10) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.8e+114: tmp = a * b elif b <= 1.95e-10: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.8e+114) tmp = Float64(a * b); elseif (b <= 1.95e-10) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.8e+114) tmp = a * b; elseif (b <= 1.95e-10) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.8e+114], N[(a * b), $MachinePrecision], If[LessEqual[b, 1.95e-10], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+114}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{-10}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if b < -6.8000000000000001e114 or 1.95e-10 < b Initial program 99.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-eval99.0%
Simplified99.0%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6455.7%
Simplified55.7%
if -6.8000000000000001e114 < b < 1.95e-10Initial 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.f6488.0%
Simplified88.0%
Taylor expanded in z around 0
+-lowering-+.f6464.8%
Simplified64.8%
Final simplification61.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.7e+77) x (if (<= y 8e+47) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e+77) {
tmp = x;
} else if (y <= 8e+47) {
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 (y <= (-1.7d+77)) then
tmp = x
else if (y <= 8d+47) 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 (y <= -1.7e+77) {
tmp = x;
} else if (y <= 8e+47) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e+77: tmp = x elif y <= 8e+47: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e+77) tmp = x; elseif (y <= 8e+47) 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 (y <= -1.7e+77) tmp = x; elseif (y <= 8e+47) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e+77], x, If[LessEqual[y, 8e+47], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+77}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+47}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.69999999999999998e77Initial 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
Simplified18.8%
if -1.69999999999999998e77 < y < 8.0000000000000004e47Initial program 99.2%
+-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.2%
Simplified99.2%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6434.5%
Simplified34.5%
if 8.0000000000000004e47 < y 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
Simplified46.0%
Final simplification34.1%
(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.5%
Taylor expanded in z around 0
+-lowering-+.f6482.1%
Simplified82.1%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y 3.8e+46) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 3.8e+46) {
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 (y <= 3.8d+46) 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 (y <= 3.8e+46) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 3.8e+46: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 3.8e+46) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 3.8e+46) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 3.8e+46], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.8 \cdot 10^{+46}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 3.7999999999999999e46Initial program 99.4%
+-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.4%
Simplified99.4%
Taylor expanded in x around inf
Simplified22.7%
if 3.7999999999999999e46 < y 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
Simplified46.0%
(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.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 x around inf
Simplified22.4%
(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 2024152
(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)))