
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* (/ y t) (- z x))))
double code(double x, double y, double z, double t) {
return x + ((y / t) * (z - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y / t) * (z - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y / t) * (z - x));
}
def code(x, y, z, t): return x + ((y / t) * (z - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y / t) * Float64(z - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y / t) * (z - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{t} \cdot \left(z - x\right)
\end{array}
Initial program 90.2%
Taylor expanded in z around 0 87.1%
+-commutative87.1%
*-commutative87.1%
associate-*r/88.5%
mul-1-neg88.5%
associate-/l*94.0%
distribute-lft-neg-in94.0%
distribute-rgt-in98.3%
sub-neg98.3%
Simplified98.3%
(FPCore (x y z t)
:precision binary64
(if (<= t -1.15e+153)
x
(if (<= t -1.52e+106)
(* x (/ y (- t)))
(if (<= t -0.085)
(/ y (/ t z))
(if (<= t 5.1e-85)
(/ x (/ (- t) y))
(if (<= t 1.2e+102) (* y (/ z t)) x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.15e+153) {
tmp = x;
} else if (t <= -1.52e+106) {
tmp = x * (y / -t);
} else if (t <= -0.085) {
tmp = y / (t / z);
} else if (t <= 5.1e-85) {
tmp = x / (-t / y);
} else if (t <= 1.2e+102) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.15d+153)) then
tmp = x
else if (t <= (-1.52d+106)) then
tmp = x * (y / -t)
else if (t <= (-0.085d0)) then
tmp = y / (t / z)
else if (t <= 5.1d-85) then
tmp = x / (-t / y)
else if (t <= 1.2d+102) then
tmp = y * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.15e+153) {
tmp = x;
} else if (t <= -1.52e+106) {
tmp = x * (y / -t);
} else if (t <= -0.085) {
tmp = y / (t / z);
} else if (t <= 5.1e-85) {
tmp = x / (-t / y);
} else if (t <= 1.2e+102) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.15e+153: tmp = x elif t <= -1.52e+106: tmp = x * (y / -t) elif t <= -0.085: tmp = y / (t / z) elif t <= 5.1e-85: tmp = x / (-t / y) elif t <= 1.2e+102: tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.15e+153) tmp = x; elseif (t <= -1.52e+106) tmp = Float64(x * Float64(y / Float64(-t))); elseif (t <= -0.085) tmp = Float64(y / Float64(t / z)); elseif (t <= 5.1e-85) tmp = Float64(x / Float64(Float64(-t) / y)); elseif (t <= 1.2e+102) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.15e+153) tmp = x; elseif (t <= -1.52e+106) tmp = x * (y / -t); elseif (t <= -0.085) tmp = y / (t / z); elseif (t <= 5.1e-85) tmp = x / (-t / y); elseif (t <= 1.2e+102) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.15e+153], x, If[LessEqual[t, -1.52e+106], N[(x * N[(y / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -0.085], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e-85], N[(x / N[((-t) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e+102], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+153}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.52 \cdot 10^{+106}:\\
\;\;\;\;x \cdot \frac{y}{-t}\\
\mathbf{elif}\;t \leq -0.085:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{\frac{-t}{y}}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+102}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.1500000000000001e153 or 1.19999999999999997e102 < t Initial program 74.2%
Taylor expanded in y around 0 65.8%
if -1.1500000000000001e153 < t < -1.52e106Initial program 85.4%
Taylor expanded in y around -inf 63.4%
Taylor expanded in z around 0 41.1%
mul-1-neg41.1%
associate-/l*55.6%
distribute-rgt-neg-in55.6%
distribute-neg-frac255.6%
Simplified55.6%
if -1.52e106 < t < -0.0850000000000000061Initial program 99.9%
Taylor expanded in y around -inf 61.5%
Taylor expanded in z around inf 52.3%
associate-/l*90.7%
Simplified52.1%
clear-num90.8%
un-div-inv90.9%
Applied egg-rr52.3%
if -0.0850000000000000061 < t < 5.1000000000000002e-85Initial program 98.8%
Taylor expanded in y around -inf 86.9%
Taylor expanded in z around 0 55.6%
associate-*r/55.6%
mul-1-neg55.6%
distribute-lft-neg-out55.6%
*-commutative55.6%
associate-/l*53.8%
Simplified53.8%
*-commutative53.8%
div-inv53.8%
associate-*l*59.2%
add-sqr-sqrt30.4%
sqrt-unprod26.9%
sqr-neg26.9%
sqrt-unprod2.6%
add-sqr-sqrt5.6%
associate-/r/5.6%
div-inv5.6%
frac-2neg5.6%
add-sqr-sqrt3.0%
sqrt-unprod28.8%
sqr-neg28.8%
sqrt-unprod28.8%
add-sqr-sqrt59.2%
distribute-neg-frac259.2%
Applied egg-rr59.2%
if 5.1000000000000002e-85 < t < 1.19999999999999997e102Initial program 97.5%
Taylor expanded in y around -inf 75.2%
Taylor expanded in z around inf 64.0%
associate-/l*87.4%
Simplified66.4%
Final simplification61.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ y (- t)))))
(if (<= t -1.15e+153)
x
(if (<= t -8e+105)
t_1
(if (<= t -0.029)
(/ y (/ t z))
(if (<= t 6.2e-80) t_1 (if (<= t 8.6e+106) (* y (/ z t)) x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y / -t);
double tmp;
if (t <= -1.15e+153) {
tmp = x;
} else if (t <= -8e+105) {
tmp = t_1;
} else if (t <= -0.029) {
tmp = y / (t / z);
} else if (t <= 6.2e-80) {
tmp = t_1;
} else if (t <= 8.6e+106) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y / -t)
if (t <= (-1.15d+153)) then
tmp = x
else if (t <= (-8d+105)) then
tmp = t_1
else if (t <= (-0.029d0)) then
tmp = y / (t / z)
else if (t <= 6.2d-80) then
tmp = t_1
else if (t <= 8.6d+106) then
tmp = y * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (y / -t);
double tmp;
if (t <= -1.15e+153) {
tmp = x;
} else if (t <= -8e+105) {
tmp = t_1;
} else if (t <= -0.029) {
tmp = y / (t / z);
} else if (t <= 6.2e-80) {
tmp = t_1;
} else if (t <= 8.6e+106) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y / -t) tmp = 0 if t <= -1.15e+153: tmp = x elif t <= -8e+105: tmp = t_1 elif t <= -0.029: tmp = y / (t / z) elif t <= 6.2e-80: tmp = t_1 elif t <= 8.6e+106: tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y / Float64(-t))) tmp = 0.0 if (t <= -1.15e+153) tmp = x; elseif (t <= -8e+105) tmp = t_1; elseif (t <= -0.029) tmp = Float64(y / Float64(t / z)); elseif (t <= 6.2e-80) tmp = t_1; elseif (t <= 8.6e+106) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y / -t); tmp = 0.0; if (t <= -1.15e+153) tmp = x; elseif (t <= -8e+105) tmp = t_1; elseif (t <= -0.029) tmp = y / (t / z); elseif (t <= 6.2e-80) tmp = t_1; elseif (t <= 8.6e+106) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y / (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+153], x, If[LessEqual[t, -8e+105], t$95$1, If[LessEqual[t, -0.029], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-80], t$95$1, If[LessEqual[t, 8.6e+106], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{-t}\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+153}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -0.029:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.1500000000000001e153 or 8.5999999999999999e106 < t Initial program 74.2%
Taylor expanded in y around 0 65.8%
if -1.1500000000000001e153 < t < -7.9999999999999995e105 or -0.0290000000000000015 < t < 6.20000000000000032e-80Initial program 97.3%
Taylor expanded in y around -inf 84.2%
Taylor expanded in z around 0 53.9%
mul-1-neg53.9%
associate-/l*58.8%
distribute-rgt-neg-in58.8%
distribute-neg-frac258.8%
Simplified58.8%
if -7.9999999999999995e105 < t < -0.0290000000000000015Initial program 99.9%
Taylor expanded in y around -inf 61.5%
Taylor expanded in z around inf 52.3%
associate-/l*90.7%
Simplified52.1%
clear-num90.8%
un-div-inv90.9%
Applied egg-rr52.3%
if 6.20000000000000032e-80 < t < 8.5999999999999999e106Initial program 97.5%
Taylor expanded in y around -inf 75.2%
Taylor expanded in z around inf 64.0%
associate-/l*87.4%
Simplified66.4%
(FPCore (x y z t)
:precision binary64
(if (<= t -8.6e+189)
(+ x (* (/ y t) z))
(if (<= t -3.25e+105)
(* x (- 1.0 (/ y t)))
(if (or (<= t -5.6e-10) (not (<= t 2.4e-27)))
(+ x (/ y (/ t z)))
(/ (* y (- z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.6e+189) {
tmp = x + ((y / t) * z);
} else if (t <= -3.25e+105) {
tmp = x * (1.0 - (y / t));
} else if ((t <= -5.6e-10) || !(t <= 2.4e-27)) {
tmp = x + (y / (t / z));
} else {
tmp = (y * (z - x)) / t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8.6d+189)) then
tmp = x + ((y / t) * z)
else if (t <= (-3.25d+105)) then
tmp = x * (1.0d0 - (y / t))
else if ((t <= (-5.6d-10)) .or. (.not. (t <= 2.4d-27))) then
tmp = x + (y / (t / z))
else
tmp = (y * (z - x)) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.6e+189) {
tmp = x + ((y / t) * z);
} else if (t <= -3.25e+105) {
tmp = x * (1.0 - (y / t));
} else if ((t <= -5.6e-10) || !(t <= 2.4e-27)) {
tmp = x + (y / (t / z));
} else {
tmp = (y * (z - x)) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -8.6e+189: tmp = x + ((y / t) * z) elif t <= -3.25e+105: tmp = x * (1.0 - (y / t)) elif (t <= -5.6e-10) or not (t <= 2.4e-27): tmp = x + (y / (t / z)) else: tmp = (y * (z - x)) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -8.6e+189) tmp = Float64(x + Float64(Float64(y / t) * z)); elseif (t <= -3.25e+105) tmp = Float64(x * Float64(1.0 - Float64(y / t))); elseif ((t <= -5.6e-10) || !(t <= 2.4e-27)) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(Float64(y * Float64(z - x)) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -8.6e+189) tmp = x + ((y / t) * z); elseif (t <= -3.25e+105) tmp = x * (1.0 - (y / t)); elseif ((t <= -5.6e-10) || ~((t <= 2.4e-27))) tmp = x + (y / (t / z)); else tmp = (y * (z - x)) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -8.6e+189], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.25e+105], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -5.6e-10], N[Not[LessEqual[t, 2.4e-27]], $MachinePrecision]], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+189}:\\
\;\;\;\;x + \frac{y}{t} \cdot z\\
\mathbf{elif}\;t \leq -3.25 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-10} \lor \neg \left(t \leq 2.4 \cdot 10^{-27}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z - x\right)}{t}\\
\end{array}
\end{array}
if t < -8.59999999999999995e189Initial program 68.7%
Taylor expanded in z around inf 82.3%
*-commutative82.3%
associate-*r/99.5%
Simplified99.5%
if -8.59999999999999995e189 < t < -3.25000000000000024e105Initial program 81.2%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
if -3.25000000000000024e105 < t < -5.60000000000000031e-10 or 2.40000000000000002e-27 < t Initial program 88.3%
Taylor expanded in z around inf 88.2%
associate-/l*92.3%
Simplified92.3%
clear-num92.3%
un-div-inv92.3%
Applied egg-rr92.3%
if -5.60000000000000031e-10 < t < 2.40000000000000002e-27Initial program 98.9%
Taylor expanded in y around -inf 88.8%
Final simplification91.1%
(FPCore (x y z t)
:precision binary64
(if (<= t -8e+195)
(+ x (* (/ y t) z))
(if (<= t -1.16e+106)
(* x (- 1.0 (/ y t)))
(if (or (<= t -3.9e-10) (not (<= t 6e-20)))
(+ x (/ y (/ t z)))
(* (/ y t) (- z x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8e+195) {
tmp = x + ((y / t) * z);
} else if (t <= -1.16e+106) {
tmp = x * (1.0 - (y / t));
} else if ((t <= -3.9e-10) || !(t <= 6e-20)) {
tmp = x + (y / (t / z));
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8d+195)) then
tmp = x + ((y / t) * z)
else if (t <= (-1.16d+106)) then
tmp = x * (1.0d0 - (y / t))
else if ((t <= (-3.9d-10)) .or. (.not. (t <= 6d-20))) then
tmp = x + (y / (t / z))
else
tmp = (y / t) * (z - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8e+195) {
tmp = x + ((y / t) * z);
} else if (t <= -1.16e+106) {
tmp = x * (1.0 - (y / t));
} else if ((t <= -3.9e-10) || !(t <= 6e-20)) {
tmp = x + (y / (t / z));
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -8e+195: tmp = x + ((y / t) * z) elif t <= -1.16e+106: tmp = x * (1.0 - (y / t)) elif (t <= -3.9e-10) or not (t <= 6e-20): tmp = x + (y / (t / z)) else: tmp = (y / t) * (z - x) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -8e+195) tmp = Float64(x + Float64(Float64(y / t) * z)); elseif (t <= -1.16e+106) tmp = Float64(x * Float64(1.0 - Float64(y / t))); elseif ((t <= -3.9e-10) || !(t <= 6e-20)) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(Float64(y / t) * Float64(z - x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -8e+195) tmp = x + ((y / t) * z); elseif (t <= -1.16e+106) tmp = x * (1.0 - (y / t)); elseif ((t <= -3.9e-10) || ~((t <= 6e-20))) tmp = x + (y / (t / z)); else tmp = (y / t) * (z - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -8e+195], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.16e+106], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.9e-10], N[Not[LessEqual[t, 6e-20]], $MachinePrecision]], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+195}:\\
\;\;\;\;x + \frac{y}{t} \cdot z\\
\mathbf{elif}\;t \leq -1.16 \cdot 10^{+106}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq -3.9 \cdot 10^{-10} \lor \neg \left(t \leq 6 \cdot 10^{-20}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\end{array}
\end{array}
if t < -7.99999999999999982e195Initial program 68.7%
Taylor expanded in z around inf 82.3%
*-commutative82.3%
associate-*r/99.5%
Simplified99.5%
if -7.99999999999999982e195 < t < -1.16000000000000004e106Initial program 81.2%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
if -1.16000000000000004e106 < t < -3.9e-10 or 6.00000000000000057e-20 < t Initial program 88.3%
Taylor expanded in z around inf 88.2%
associate-/l*92.3%
Simplified92.3%
clear-num92.3%
un-div-inv92.3%
Applied egg-rr92.3%
if -3.9e-10 < t < 6.00000000000000057e-20Initial program 98.9%
Taylor expanded in y around -inf 88.8%
Taylor expanded in z around 0 83.4%
+-commutative93.5%
*-commutative93.5%
associate-*r/90.8%
mul-1-neg90.8%
associate-/l*89.8%
distribute-lft-neg-in89.8%
distribute-rgt-in98.9%
sub-neg98.9%
Simplified88.8%
Final simplification91.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -3.5e+189)
t_1
(if (<= t -1.4e+106)
(* x (- 1.0 (/ y t)))
(if (or (<= t -3e-9) (not (<= t 2.3e-26))) t_1 (* (/ y t) (- z x)))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -3.5e+189) {
tmp = t_1;
} else if (t <= -1.4e+106) {
tmp = x * (1.0 - (y / t));
} else if ((t <= -3e-9) || !(t <= 2.3e-26)) {
tmp = t_1;
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-3.5d+189)) then
tmp = t_1
else if (t <= (-1.4d+106)) then
tmp = x * (1.0d0 - (y / t))
else if ((t <= (-3d-9)) .or. (.not. (t <= 2.3d-26))) then
tmp = t_1
else
tmp = (y / t) * (z - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -3.5e+189) {
tmp = t_1;
} else if (t <= -1.4e+106) {
tmp = x * (1.0 - (y / t));
} else if ((t <= -3e-9) || !(t <= 2.3e-26)) {
tmp = t_1;
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (z / t)) tmp = 0 if t <= -3.5e+189: tmp = t_1 elif t <= -1.4e+106: tmp = x * (1.0 - (y / t)) elif (t <= -3e-9) or not (t <= 2.3e-26): tmp = t_1 else: tmp = (y / t) * (z - x) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -3.5e+189) tmp = t_1; elseif (t <= -1.4e+106) tmp = Float64(x * Float64(1.0 - Float64(y / t))); elseif ((t <= -3e-9) || !(t <= 2.3e-26)) tmp = t_1; else tmp = Float64(Float64(y / t) * Float64(z - x)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -3.5e+189) tmp = t_1; elseif (t <= -1.4e+106) tmp = x * (1.0 - (y / t)); elseif ((t <= -3e-9) || ~((t <= 2.3e-26))) tmp = t_1; else tmp = (y / t) * (z - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e+189], t$95$1, If[LessEqual[t, -1.4e+106], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3e-9], N[Not[LessEqual[t, 2.3e-26]], $MachinePrecision]], t$95$1, N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{+106}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-9} \lor \neg \left(t \leq 2.3 \cdot 10^{-26}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\end{array}
\end{array}
if t < -3.49999999999999996e189 or -1.39999999999999996e106 < t < -2.99999999999999998e-9 or 2.30000000000000009e-26 < t Initial program 84.1%
Taylor expanded in z around inf 86.9%
associate-/l*92.6%
Simplified92.6%
if -3.49999999999999996e189 < t < -1.39999999999999996e106Initial program 81.2%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
if -2.99999999999999998e-9 < t < 2.30000000000000009e-26Initial program 98.9%
Taylor expanded in y around -inf 88.8%
Taylor expanded in z around 0 83.4%
+-commutative93.5%
*-commutative93.5%
associate-*r/90.8%
mul-1-neg90.8%
associate-/l*89.8%
distribute-lft-neg-in89.8%
distribute-rgt-in98.9%
sub-neg98.9%
Simplified88.8%
Final simplification90.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y t)))))
(if (<= x -1.95e-33)
t_1
(if (<= x -4.3e-151)
(/ y (/ t z))
(if (or (<= x -7e-177) (not (<= x 2.55e-59))) t_1 (* (/ y t) z))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / t));
double tmp;
if (x <= -1.95e-33) {
tmp = t_1;
} else if (x <= -4.3e-151) {
tmp = y / (t / z);
} else if ((x <= -7e-177) || !(x <= 2.55e-59)) {
tmp = t_1;
} else {
tmp = (y / t) * z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / t))
if (x <= (-1.95d-33)) then
tmp = t_1
else if (x <= (-4.3d-151)) then
tmp = y / (t / z)
else if ((x <= (-7d-177)) .or. (.not. (x <= 2.55d-59))) then
tmp = t_1
else
tmp = (y / t) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (y / t));
double tmp;
if (x <= -1.95e-33) {
tmp = t_1;
} else if (x <= -4.3e-151) {
tmp = y / (t / z);
} else if ((x <= -7e-177) || !(x <= 2.55e-59)) {
tmp = t_1;
} else {
tmp = (y / t) * z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (y / t)) tmp = 0 if x <= -1.95e-33: tmp = t_1 elif x <= -4.3e-151: tmp = y / (t / z) elif (x <= -7e-177) or not (x <= 2.55e-59): tmp = t_1 else: tmp = (y / t) * z return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(y / t))) tmp = 0.0 if (x <= -1.95e-33) tmp = t_1; elseif (x <= -4.3e-151) tmp = Float64(y / Float64(t / z)); elseif ((x <= -7e-177) || !(x <= 2.55e-59)) tmp = t_1; else tmp = Float64(Float64(y / t) * z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (y / t)); tmp = 0.0; if (x <= -1.95e-33) tmp = t_1; elseif (x <= -4.3e-151) tmp = y / (t / z); elseif ((x <= -7e-177) || ~((x <= 2.55e-59))) tmp = t_1; else tmp = (y / t) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e-33], t$95$1, If[LessEqual[x, -4.3e-151], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -7e-177], N[Not[LessEqual[x, 2.55e-59]], $MachinePrecision]], t$95$1, N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{-151}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-177} \lor \neg \left(x \leq 2.55 \cdot 10^{-59}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\end{array}
\end{array}
if x < -1.94999999999999987e-33 or -4.30000000000000018e-151 < x < -7.0000000000000003e-177 or 2.5499999999999998e-59 < x Initial program 89.0%
Taylor expanded in x around inf 86.8%
mul-1-neg86.8%
unsub-neg86.8%
Simplified86.8%
if -1.94999999999999987e-33 < x < -4.30000000000000018e-151Initial program 95.8%
Taylor expanded in y around -inf 75.7%
Taylor expanded in z around inf 58.5%
associate-/l*82.2%
Simplified62.3%
clear-num82.2%
un-div-inv82.3%
Applied egg-rr62.4%
if -7.0000000000000003e-177 < x < 2.5499999999999998e-59Initial program 91.0%
Taylor expanded in y around -inf 76.1%
Taylor expanded in z around inf 69.9%
*-commutative84.5%
associate-*r/90.9%
Simplified77.2%
Final simplification81.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* (/ y t) z))))
(if (<= t -4.2e+188)
t_1
(if (<= t -7.4e+105)
(* x (- 1.0 (/ y t)))
(if (<= t -3.8e-6)
t_1
(if (<= t 1.3e-25) (* (/ y t) (- z x)) (+ x (* y (/ z t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + ((y / t) * z);
double tmp;
if (t <= -4.2e+188) {
tmp = t_1;
} else if (t <= -7.4e+105) {
tmp = x * (1.0 - (y / t));
} else if (t <= -3.8e-6) {
tmp = t_1;
} else if (t <= 1.3e-25) {
tmp = (y / t) * (z - x);
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y / t) * z)
if (t <= (-4.2d+188)) then
tmp = t_1
else if (t <= (-7.4d+105)) then
tmp = x * (1.0d0 - (y / t))
else if (t <= (-3.8d-6)) then
tmp = t_1
else if (t <= 1.3d-25) then
tmp = (y / t) * (z - x)
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + ((y / t) * z);
double tmp;
if (t <= -4.2e+188) {
tmp = t_1;
} else if (t <= -7.4e+105) {
tmp = x * (1.0 - (y / t));
} else if (t <= -3.8e-6) {
tmp = t_1;
} else if (t <= 1.3e-25) {
tmp = (y / t) * (z - x);
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + ((y / t) * z) tmp = 0 if t <= -4.2e+188: tmp = t_1 elif t <= -7.4e+105: tmp = x * (1.0 - (y / t)) elif t <= -3.8e-6: tmp = t_1 elif t <= 1.3e-25: tmp = (y / t) * (z - x) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(Float64(y / t) * z)) tmp = 0.0 if (t <= -4.2e+188) tmp = t_1; elseif (t <= -7.4e+105) tmp = Float64(x * Float64(1.0 - Float64(y / t))); elseif (t <= -3.8e-6) tmp = t_1; elseif (t <= 1.3e-25) tmp = Float64(Float64(y / t) * Float64(z - x)); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + ((y / t) * z); tmp = 0.0; if (t <= -4.2e+188) tmp = t_1; elseif (t <= -7.4e+105) tmp = x * (1.0 - (y / t)); elseif (t <= -3.8e-6) tmp = t_1; elseif (t <= 1.3e-25) tmp = (y / t) * (z - x); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+188], t$95$1, If[LessEqual[t, -7.4e+105], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.8e-6], t$95$1, If[LessEqual[t, 1.3e-25], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{t} \cdot z\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.4 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-25}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if t < -4.19999999999999973e188 or -7.3999999999999997e105 < t < -3.8e-6Initial program 82.7%
Taylor expanded in z around inf 86.4%
*-commutative86.4%
associate-*r/95.8%
Simplified95.8%
if -4.19999999999999973e188 < t < -7.3999999999999997e105Initial program 81.2%
Taylor expanded in x around inf 85.7%
mul-1-neg85.7%
unsub-neg85.7%
Simplified85.7%
if -3.8e-6 < t < 1.3e-25Initial program 98.9%
Taylor expanded in y around -inf 88.8%
Taylor expanded in z around 0 83.4%
+-commutative93.5%
*-commutative93.5%
associate-*r/90.8%
mul-1-neg90.8%
associate-/l*89.8%
distribute-lft-neg-in89.8%
distribute-rgt-in98.9%
sub-neg98.9%
Simplified88.8%
if 1.3e-25 < t Initial program 85.0%
Taylor expanded in z around inf 87.3%
associate-/l*92.6%
Simplified92.6%
Final simplification91.0%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5e-20) (not (<= x 3.5e+14))) (* x (- 1.0 (/ y t))) (* (/ y t) (- z x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5e-20) || !(x <= 3.5e+14)) {
tmp = x * (1.0 - (y / t));
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-5d-20)) .or. (.not. (x <= 3.5d+14))) then
tmp = x * (1.0d0 - (y / t))
else
tmp = (y / t) * (z - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5e-20) || !(x <= 3.5e+14)) {
tmp = x * (1.0 - (y / t));
} else {
tmp = (y / t) * (z - x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5e-20) or not (x <= 3.5e+14): tmp = x * (1.0 - (y / t)) else: tmp = (y / t) * (z - x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5e-20) || !(x <= 3.5e+14)) tmp = Float64(x * Float64(1.0 - Float64(y / t))); else tmp = Float64(Float64(y / t) * Float64(z - x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5e-20) || ~((x <= 3.5e+14))) tmp = x * (1.0 - (y / t)); else tmp = (y / t) * (z - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5e-20], N[Not[LessEqual[x, 3.5e+14]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-20} \lor \neg \left(x \leq 3.5 \cdot 10^{+14}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(z - x\right)\\
\end{array}
\end{array}
if x < -4.9999999999999999e-20 or 3.5e14 < x Initial program 86.6%
Taylor expanded in x around inf 90.6%
mul-1-neg90.6%
unsub-neg90.6%
Simplified90.6%
if -4.9999999999999999e-20 < x < 3.5e14Initial program 93.9%
Taylor expanded in y around -inf 74.7%
Taylor expanded in z around 0 73.9%
+-commutative93.1%
*-commutative93.1%
associate-*r/94.5%
mul-1-neg94.5%
associate-/l*93.6%
distribute-lft-neg-in93.6%
distribute-rgt-in96.8%
sub-neg96.8%
Simplified78.1%
Final simplification84.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.45e-13) (not (<= z 1.12e-8))) (* (/ y t) z) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.45e-13) || !(z <= 1.12e-8)) {
tmp = (y / t) * z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.45d-13)) .or. (.not. (z <= 1.12d-8))) then
tmp = (y / t) * z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.45e-13) || !(z <= 1.12e-8)) {
tmp = (y / t) * z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.45e-13) or not (z <= 1.12e-8): tmp = (y / t) * z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.45e-13) || !(z <= 1.12e-8)) tmp = Float64(Float64(y / t) * z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.45e-13) || ~((z <= 1.12e-8))) tmp = (y / t) * z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.45e-13], N[Not[LessEqual[z, 1.12e-8]], $MachinePrecision]], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-13} \lor \neg \left(z \leq 1.12 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{y}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.4499999999999999e-13 or 1.11999999999999994e-8 < z Initial program 86.4%
Taylor expanded in y around -inf 72.6%
Taylor expanded in z around inf 60.3%
*-commutative77.8%
associate-*r/83.8%
Simplified65.3%
if -1.4499999999999999e-13 < z < 1.11999999999999994e-8Initial program 94.0%
Taylor expanded in y around 0 47.3%
Final simplification56.2%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.4e-12) (not (<= z 2.9e-12))) (* y (/ z t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.4e-12) || !(z <= 2.9e-12)) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.4d-12)) .or. (.not. (z <= 2.9d-12))) then
tmp = y * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.4e-12) || !(z <= 2.9e-12)) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.4e-12) or not (z <= 2.9e-12): tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.4e-12) || !(z <= 2.9e-12)) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.4e-12) || ~((z <= 2.9e-12))) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.4e-12], N[Not[LessEqual[z, 2.9e-12]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-12} \lor \neg \left(z \leq 2.9 \cdot 10^{-12}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.4000000000000001e-12 or 2.9000000000000002e-12 < z Initial program 86.4%
Taylor expanded in y around -inf 72.6%
Taylor expanded in z around inf 60.3%
associate-/l*82.9%
Simplified63.9%
if -1.4000000000000001e-12 < z < 2.9000000000000002e-12Initial program 94.0%
Taylor expanded in y around 0 47.3%
Final simplification55.6%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 90.2%
Taylor expanded in y around 0 34.4%
(FPCore (x y z t) :precision binary64 (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - ((x * (y / t)) + (-z * (y / t)))
end function
public static double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
def code(x, y, z, t): return x - ((x * (y / t)) + (-z * (y / t)))
function code(x, y, z, t) return Float64(x - Float64(Float64(x * Float64(y / t)) + Float64(Float64(-z) * Float64(y / t)))) end
function tmp = code(x, y, z, t) tmp = x - ((x * (y / t)) + (-z * (y / t))); end
code[x_, y_, z_, t_] := N[(x - N[(N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[((-z) * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right)
\end{array}
herbie shell --seed 2024081
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:alt
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))