
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((x + y) + z) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ x y)) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (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 = ((z + (x + y)) - (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 ((z + (x + y)) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)) (t_2 (+ t_1 (+ x y))))
(if (<= t_1 -2e+202)
t_2
(if (<= t_1 1e+71) (+ (- (+ z (+ x y)) (* z (log t))) (* b -0.5)) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double t_2 = t_1 + (x + y);
double tmp;
if (t_1 <= -2e+202) {
tmp = t_2;
} else if (t_1 <= 1e+71) {
tmp = ((z + (x + y)) - (z * log(t))) + (b * -0.5);
} 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 = (a - 0.5d0) * b
t_2 = t_1 + (x + y)
if (t_1 <= (-2d+202)) then
tmp = t_2
else if (t_1 <= 1d+71) then
tmp = ((z + (x + y)) - (z * log(t))) + (b * (-0.5d0))
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 = (a - 0.5) * b;
double t_2 = t_1 + (x + y);
double tmp;
if (t_1 <= -2e+202) {
tmp = t_2;
} else if (t_1 <= 1e+71) {
tmp = ((z + (x + y)) - (z * Math.log(t))) + (b * -0.5);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b t_2 = t_1 + (x + y) tmp = 0 if t_1 <= -2e+202: tmp = t_2 elif t_1 <= 1e+71: tmp = ((z + (x + y)) - (z * math.log(t))) + (b * -0.5) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) t_2 = Float64(t_1 + Float64(x + y)) tmp = 0.0 if (t_1 <= -2e+202) tmp = t_2; elseif (t_1 <= 1e+71) tmp = Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(b * -0.5)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; t_2 = t_1 + (x + y); tmp = 0.0; if (t_1 <= -2e+202) tmp = t_2; elseif (t_1 <= 1e+71) tmp = ((z + (x + y)) - (z * log(t))) + (b * -0.5); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+202], t$95$2, If[LessEqual[t$95$1, 1e+71], N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := t\_1 + \left(x + y\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+202}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+71}:\\
\;\;\;\;\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + b \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.9999999999999998e202 or 1e71 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6496.7%
Simplified96.7%
if -1.9999999999999998e202 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e71Initial program 99.7%
Taylor expanded in a around 0
*-commutativeN/A
*-lowering-*.f6496.6%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)) (t_2 (+ t_1 (+ x y))))
(if (<= t_1 -1e+20)
t_2
(if (<= t_1 1e+71) (+ (+ x y) (* z (- 1.0 (log t)))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double t_2 = t_1 + (x + y);
double tmp;
if (t_1 <= -1e+20) {
tmp = t_2;
} else if (t_1 <= 1e+71) {
tmp = (x + y) + (z * (1.0 - log(t)));
} 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 = (a - 0.5d0) * b
t_2 = t_1 + (x + y)
if (t_1 <= (-1d+20)) then
tmp = t_2
else if (t_1 <= 1d+71) then
tmp = (x + y) + (z * (1.0d0 - log(t)))
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 = (a - 0.5) * b;
double t_2 = t_1 + (x + y);
double tmp;
if (t_1 <= -1e+20) {
tmp = t_2;
} else if (t_1 <= 1e+71) {
tmp = (x + y) + (z * (1.0 - Math.log(t)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b t_2 = t_1 + (x + y) tmp = 0 if t_1 <= -1e+20: tmp = t_2 elif t_1 <= 1e+71: tmp = (x + y) + (z * (1.0 - math.log(t))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) t_2 = Float64(t_1 + Float64(x + y)) tmp = 0.0 if (t_1 <= -1e+20) tmp = t_2; elseif (t_1 <= 1e+71) tmp = Float64(Float64(x + y) + Float64(z * Float64(1.0 - log(t)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; t_2 = t_1 + (x + y); tmp = 0.0; if (t_1 <= -1e+20) tmp = t_2; elseif (t_1 <= 1e+71) tmp = (x + y) + (z * (1.0 - log(t))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+20], t$95$2, If[LessEqual[t$95$1, 1e+71], N[(N[(x + y), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := t\_1 + \left(x + y\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 10^{+71}:\\
\;\;\;\;\left(x + y\right) + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1e20 or 1e71 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6493.5%
Simplified93.5%
if -1e20 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 1e71Initial program 99.7%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6495.8%
Simplified95.8%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -1.45e+151)
(+ y t_1)
(if (<= z 1.5e+97) (+ (* (- a 0.5) b) (+ x y)) (+ x 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 <= -1.45e+151) {
tmp = y + t_1;
} else if (z <= 1.5e+97) {
tmp = ((a - 0.5) * b) + (x + y);
} else {
tmp = x + 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 <= (-1.45d+151)) then
tmp = y + t_1
else if (z <= 1.5d+97) then
tmp = ((a - 0.5d0) * b) + (x + y)
else
tmp = x + 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 <= -1.45e+151) {
tmp = y + t_1;
} else if (z <= 1.5e+97) {
tmp = ((a - 0.5) * b) + (x + y);
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -1.45e+151: tmp = y + t_1 elif z <= 1.5e+97: tmp = ((a - 0.5) * b) + (x + y) else: tmp = x + 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 <= -1.45e+151) tmp = Float64(y + t_1); elseif (z <= 1.5e+97) tmp = Float64(Float64(Float64(a - 0.5) * b) + Float64(x + y)); else tmp = Float64(x + 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 <= -1.45e+151) tmp = y + t_1; elseif (z <= 1.5e+97) tmp = ((a - 0.5) * b) + (x + y); else tmp = x + 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, -1.45e+151], N[(y + t$95$1), $MachinePrecision], If[LessEqual[z, 1.5e+97], N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+151}:\\
\;\;\;\;y + t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;\left(a - 0.5\right) \cdot b + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if z < -1.45000000000000009e151Initial program 99.3%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6491.5%
Simplified91.5%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6483.3%
Simplified83.3%
if -1.45000000000000009e151 < z < 1.4999999999999999e97Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6493.8%
Simplified93.8%
if 1.4999999999999999e97 < z Initial program 99.7%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6475.0%
Simplified75.0%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6469.6%
Simplified69.6%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- 1.0 (log t))))))
(if (<= z -2.3e+168)
t_1
(if (<= z 1.5e+97) (+ (* (- a 0.5) b) (+ x y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - log(t)));
double tmp;
if (z <= -2.3e+168) {
tmp = t_1;
} else if (z <= 1.5e+97) {
tmp = ((a - 0.5) * b) + (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 = x + (z * (1.0d0 - log(t)))
if (z <= (-2.3d+168)) then
tmp = t_1
else if (z <= 1.5d+97) then
tmp = ((a - 0.5d0) * b) + (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 = x + (z * (1.0 - Math.log(t)));
double tmp;
if (z <= -2.3e+168) {
tmp = t_1;
} else if (z <= 1.5e+97) {
tmp = ((a - 0.5) * b) + (x + y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (1.0 - math.log(t))) tmp = 0 if z <= -2.3e+168: tmp = t_1 elif z <= 1.5e+97: tmp = ((a - 0.5) * b) + (x + y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(1.0 - log(t)))) tmp = 0.0 if (z <= -2.3e+168) tmp = t_1; elseif (z <= 1.5e+97) tmp = Float64(Float64(Float64(a - 0.5) * b) + Float64(x + y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (1.0 - log(t))); tmp = 0.0; if (z <= -2.3e+168) tmp = t_1; elseif (z <= 1.5e+97) tmp = ((a - 0.5) * b) + (x + y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e+168], t$95$1, If[LessEqual[z, 1.5e+97], N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+97}:\\
\;\;\;\;\left(a - 0.5\right) \cdot b + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.2999999999999999e168 or 1.4999999999999999e97 < z Initial program 99.5%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6481.8%
Simplified81.8%
Taylor expanded in y around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
log-lowering-log.f6474.9%
Simplified74.9%
if -2.2999999999999999e168 < z < 1.4999999999999999e97Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6493.4%
Simplified93.4%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.1e+166)
t_1
(if (<= z 2.6e+159) (+ (* (- a 0.5) b) (+ x y)) 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.1e+166) {
tmp = t_1;
} else if (z <= 2.6e+159) {
tmp = ((a - 0.5) * b) + (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 = z * (1.0d0 - log(t))
if (z <= (-2.1d+166)) then
tmp = t_1
else if (z <= 2.6d+159) then
tmp = ((a - 0.5d0) * b) + (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 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -2.1e+166) {
tmp = t_1;
} else if (z <= 2.6e+159) {
tmp = ((a - 0.5) * b) + (x + y);
} 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.1e+166: tmp = t_1 elif z <= 2.6e+159: tmp = ((a - 0.5) * b) + (x + y) 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.1e+166) tmp = t_1; elseif (z <= 2.6e+159) tmp = Float64(Float64(Float64(a - 0.5) * b) + Float64(x + y)); 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.1e+166) tmp = t_1; elseif (z <= 2.6e+159) tmp = ((a - 0.5) * b) + (x + y); 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.1e+166], t$95$1, If[LessEqual[z, 2.6e+159], N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $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.1 \cdot 10^{+166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+159}:\\
\;\;\;\;\left(a - 0.5\right) \cdot b + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1000000000000001e166 or 2.6e159 < z Initial program 99.4%
Taylor expanded in z around inf
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f6465.9%
Simplified65.9%
if -2.1000000000000001e166 < z < 2.6e159Initial program 100.0%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6491.9%
Simplified91.9%
Final simplification86.2%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- a 0.5) b)) (t_2 (+ x t_1))) (if (<= t_1 -2e+204) t_2 (if (<= t_1 4e+82) (+ x y) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double t_2 = x + t_1;
double tmp;
if (t_1 <= -2e+204) {
tmp = t_2;
} else if (t_1 <= 4e+82) {
tmp = x + 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 = (a - 0.5d0) * b
t_2 = x + t_1
if (t_1 <= (-2d+204)) then
tmp = t_2
else if (t_1 <= 4d+82) then
tmp = x + 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 = (a - 0.5) * b;
double t_2 = x + t_1;
double tmp;
if (t_1 <= -2e+204) {
tmp = t_2;
} else if (t_1 <= 4e+82) {
tmp = x + y;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b t_2 = x + t_1 tmp = 0 if t_1 <= -2e+204: tmp = t_2 elif t_1 <= 4e+82: tmp = x + y else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) t_2 = Float64(x + t_1) tmp = 0.0 if (t_1 <= -2e+204) tmp = t_2; elseif (t_1 <= 4e+82) tmp = Float64(x + y); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; t_2 = x + t_1; tmp = 0.0; if (t_1 <= -2e+204) tmp = t_2; elseif (t_1 <= 4e+82) tmp = x + y; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(x + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+204], t$95$2, If[LessEqual[t$95$1, 4e+82], N[(x + y), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
t_2 := x + t\_1\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+204}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+82}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < -1.99999999999999998e204 or 3.9999999999999999e82 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) Initial program 100.0%
Taylor expanded in x around inf
Simplified85.4%
if -1.99999999999999998e204 < (*.f64 (-.f64 a #s(literal 1/2 binary64)) b) < 3.9999999999999999e82Initial program 99.7%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6490.8%
Simplified90.8%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6459.2%
Simplified59.2%
Final simplification69.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (+ a -0.5))))
(if (<= b -1.14e+82)
t_1
(if (<= b -7.3e-72) (+ x (* a b)) (if (<= b 1.4e+59) (+ 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 (b <= -1.14e+82) {
tmp = t_1;
} else if (b <= -7.3e-72) {
tmp = x + (a * b);
} else if (b <= 1.4e+59) {
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 = b * (a + (-0.5d0))
if (b <= (-1.14d+82)) then
tmp = t_1
else if (b <= (-7.3d-72)) then
tmp = x + (a * b)
else if (b <= 1.4d+59) 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 = b * (a + -0.5);
double tmp;
if (b <= -1.14e+82) {
tmp = t_1;
} else if (b <= -7.3e-72) {
tmp = x + (a * b);
} else if (b <= 1.4e+59) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a + -0.5) tmp = 0 if b <= -1.14e+82: tmp = t_1 elif b <= -7.3e-72: tmp = x + (a * b) elif b <= 1.4e+59: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (b <= -1.14e+82) tmp = t_1; elseif (b <= -7.3e-72) tmp = Float64(x + Float64(a * b)); elseif (b <= 1.4e+59) tmp = Float64(x + y); else tmp = 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 (b <= -1.14e+82) tmp = t_1; elseif (b <= -7.3e-72) tmp = x + (a * b); elseif (b <= 1.4e+59) tmp = x + y; else tmp = 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[b, -1.14e+82], t$95$1, If[LessEqual[b, -7.3e-72], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+59], N[(x + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;b \leq -1.14 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -7.3 \cdot 10^{-72}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+59}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.14000000000000007e82 or 1.3999999999999999e59 < b Initial program 100.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6475.3%
Simplified75.3%
if -1.14000000000000007e82 < b < -7.30000000000000002e-72Initial program 99.9%
Taylor expanded in x around inf
Simplified59.5%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6455.7%
Simplified55.7%
if -7.30000000000000002e-72 < b < 1.3999999999999999e59Initial program 99.8%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6489.8%
Simplified89.8%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6461.0%
Simplified61.0%
Final simplification65.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ a -0.5)))) (if (<= b -5.6e-11) t_1 (if (<= b 1.15e+59) (+ 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 (b <= -5.6e-11) {
tmp = t_1;
} else if (b <= 1.15e+59) {
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 = b * (a + (-0.5d0))
if (b <= (-5.6d-11)) then
tmp = t_1
else if (b <= 1.15d+59) 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 = b * (a + -0.5);
double tmp;
if (b <= -5.6e-11) {
tmp = t_1;
} else if (b <= 1.15e+59) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a + -0.5) tmp = 0 if b <= -5.6e-11: tmp = t_1 elif b <= 1.15e+59: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (b <= -5.6e-11) tmp = t_1; elseif (b <= 1.15e+59) tmp = Float64(x + y); else tmp = 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 (b <= -5.6e-11) tmp = t_1; elseif (b <= 1.15e+59) tmp = x + y; else tmp = 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[b, -5.6e-11], t$95$1, If[LessEqual[b, 1.15e+59], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;b \leq -5.6 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.15 \cdot 10^{+59}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.6e-11 or 1.15000000000000004e59 < b Initial program 99.9%
Taylor expanded in b around inf
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6469.9%
Simplified69.9%
if -5.6e-11 < b < 1.15000000000000004e59Initial program 99.8%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6486.7%
Simplified86.7%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6458.5%
Simplified58.5%
Final simplification63.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.6e+118) (* a b) (if (<= a 4.2e+152) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.6e+118) {
tmp = a * b;
} else if (a <= 4.2e+152) {
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 (a <= (-1.6d+118)) then
tmp = a * b
else if (a <= 4.2d+152) 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 (a <= -1.6e+118) {
tmp = a * b;
} else if (a <= 4.2e+152) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.6e+118: tmp = a * b elif a <= 4.2e+152: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.6e+118) tmp = Float64(a * b); elseif (a <= 4.2e+152) 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 (a <= -1.6e+118) tmp = a * b; elseif (a <= 4.2e+152) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.6e+118], N[(a * b), $MachinePrecision], If[LessEqual[a, 4.2e+152], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+118}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+152}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -1.60000000000000008e118 or 4.2000000000000003e152 < a Initial program 99.9%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6464.7%
Simplified64.7%
if -1.60000000000000008e118 < a < 4.2000000000000003e152Initial program 99.8%
Taylor expanded in b around 0
cancel-sign-sub-invN/A
associate-+r+N/A
associate-+l+N/A
cancel-sign-sub-invN/A
*-rgt-identityN/A
distribute-lft-out--N/A
+-commutativeN/A
+-lowering-+.f64N/A
sub-negN/A
mul-1-negN/A
*-lowering-*.f64N/A
mul-1-negN/A
sub-negN/A
--lowering--.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
+-lowering-+.f6473.1%
Simplified73.1%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6449.5%
Simplified49.5%
Final simplification53.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -9e-307) x (if (<= y 2.9e+79) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9e-307) {
tmp = x;
} else if (y <= 2.9e+79) {
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 <= (-9d-307)) then
tmp = x
else if (y <= 2.9d+79) 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 <= -9e-307) {
tmp = x;
} else if (y <= 2.9e+79) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9e-307: tmp = x elif y <= 2.9e+79: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9e-307) tmp = x; elseif (y <= 2.9e+79) 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 <= -9e-307) tmp = x; elseif (y <= 2.9e+79) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9e-307], x, If[LessEqual[y, 2.9e+79], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-307}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+79}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -8.99999999999999978e-307Initial program 99.8%
Taylor expanded in x around inf
Simplified28.1%
if -8.99999999999999978e-307 < y < 2.89999999999999992e79Initial program 99.8%
Taylor expanded in a around inf
*-commutativeN/A
*-lowering-*.f6436.4%
Simplified36.4%
if 2.89999999999999992e79 < y Initial program 99.9%
Taylor expanded in y around inf
Simplified42.7%
Final simplification33.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* (- a 0.5) b))) (if (<= y 4.4e-44) (+ x t_1) (+ 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 (y <= 4.4e-44) {
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 = (a - 0.5d0) * b
if (y <= 4.4d-44) 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 = (a - 0.5) * b;
double tmp;
if (y <= 4.4e-44) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if y <= 4.4e-44: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if (y <= 4.4e-44) 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 = (a - 0.5) * b; tmp = 0.0; if (y <= 4.4e-44) 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[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[y, 4.4e-44], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;y \leq 4.4 \cdot 10^{-44}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;y + t\_1\\
\end{array}
\end{array}
if y < 4.40000000000000024e-44Initial program 99.8%
Taylor expanded in x around inf
Simplified66.4%
if 4.40000000000000024e-44 < y Initial program 99.8%
Taylor expanded in y around inf
Simplified68.9%
(FPCore (x y z t a b) :precision binary64 (+ (* (- a 0.5) b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((a - 0.5) * b) + (x + y);
}
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 = ((a - 0.5d0) * b) + (x + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((a - 0.5) * b) + (x + y);
}
def code(x, y, z, t, a, b): return ((a - 0.5) * b) + (x + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(a - 0.5) * b) + Float64(x + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((a - 0.5) * b) + (x + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a - 0.5\right) \cdot b + \left(x + y\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f6478.7%
Simplified78.7%
Final simplification78.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y 3.4e-44) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 3.4e-44) {
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.4d-44) 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.4e-44) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 3.4e-44: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 3.4e-44) 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.4e-44) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 3.4e-44], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 3.40000000000000016e-44Initial program 99.8%
Taylor expanded in x around inf
Simplified29.2%
if 3.40000000000000016e-44 < y Initial program 99.8%
Taylor expanded in y around inf
Simplified36.2%
(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.8%
Taylor expanded in x around inf
Simplified24.7%
(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 2024185
(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)))