
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (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 - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.8%
Final simplification97.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ x y)))))
(if (<= y -3.2e-108)
t_1
(if (<= y 3.1e-86)
(/ (* x t) z)
(if (<= y 0.00034)
t_1
(if (<= y 1.82e+25)
(* t (/ x z))
(if (<= y 2e+59) (/ t (/ z (- y))) t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -3.2e-108) {
tmp = t_1;
} else if (y <= 3.1e-86) {
tmp = (x * t) / z;
} else if (y <= 0.00034) {
tmp = t_1;
} else if (y <= 1.82e+25) {
tmp = t * (x / z);
} else if (y <= 2e+59) {
tmp = t / (z / -y);
} else {
tmp = t_1;
}
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 = t * (1.0d0 - (x / y))
if (y <= (-3.2d-108)) then
tmp = t_1
else if (y <= 3.1d-86) then
tmp = (x * t) / z
else if (y <= 0.00034d0) then
tmp = t_1
else if (y <= 1.82d+25) then
tmp = t * (x / z)
else if (y <= 2d+59) then
tmp = t / (z / -y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (1.0 - (x / y));
double tmp;
if (y <= -3.2e-108) {
tmp = t_1;
} else if (y <= 3.1e-86) {
tmp = (x * t) / z;
} else if (y <= 0.00034) {
tmp = t_1;
} else if (y <= 1.82e+25) {
tmp = t * (x / z);
} else if (y <= 2e+59) {
tmp = t / (z / -y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (1.0 - (x / y)) tmp = 0 if y <= -3.2e-108: tmp = t_1 elif y <= 3.1e-86: tmp = (x * t) / z elif y <= 0.00034: tmp = t_1 elif y <= 1.82e+25: tmp = t * (x / z) elif y <= 2e+59: tmp = t / (z / -y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(1.0 - Float64(x / y))) tmp = 0.0 if (y <= -3.2e-108) tmp = t_1; elseif (y <= 3.1e-86) tmp = Float64(Float64(x * t) / z); elseif (y <= 0.00034) tmp = t_1; elseif (y <= 1.82e+25) tmp = Float64(t * Float64(x / z)); elseif (y <= 2e+59) tmp = Float64(t / Float64(z / Float64(-y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (1.0 - (x / y)); tmp = 0.0; if (y <= -3.2e-108) tmp = t_1; elseif (y <= 3.1e-86) tmp = (x * t) / z; elseif (y <= 0.00034) tmp = t_1; elseif (y <= 1.82e+25) tmp = t * (x / z); elseif (y <= 2e+59) tmp = t / (z / -y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e-108], t$95$1, If[LessEqual[y, 3.1e-86], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 0.00034], t$95$1, If[LessEqual[y, 1.82e+25], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+59], N[(t / N[(z / (-y)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-86}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 0.00034:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.82 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+59}:\\
\;\;\;\;\frac{t}{\frac{z}{-y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.2e-108 or 3.09999999999999989e-86 < y < 3.4e-4 or 1.99999999999999994e59 < y Initial program 99.1%
Taylor expanded in z around 0 70.1%
mul-1-neg70.1%
div-sub70.2%
sub-neg70.2%
*-inverses70.2%
metadata-eval70.2%
Simplified70.2%
Taylor expanded in x around 0 65.1%
mul-1-neg65.1%
distribute-frac-neg265.1%
associate-*r/70.2%
*-rgt-identity70.2%
distribute-frac-neg270.2%
mul-1-neg70.2%
distribute-lft-in70.2%
mul-1-neg70.2%
sub-neg70.2%
Simplified70.2%
if -3.2e-108 < y < 3.09999999999999989e-86Initial program 94.9%
associate-*l/98.6%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in y around 0 82.1%
if 3.4e-4 < y < 1.8199999999999999e25Initial program 99.7%
Taylor expanded in y around 0 64.8%
if 1.8199999999999999e25 < y < 1.99999999999999994e59Initial program 99.8%
associate-*l/99.8%
associate-/l*99.3%
Simplified99.3%
associate-*r/99.8%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 77.9%
mul-1-neg77.9%
Simplified77.9%
Taylor expanded in z around inf 49.7%
Final simplification73.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (- 1.0 (/ z y)))))
(if (<= y -4.6e+57)
t_1
(if (<= y -1.15e-88)
(* t (/ x (- z y)))
(if (<= y 6e-100)
(/ (* (- x y) t) z)
(if (<= y 9.5e-49) (/ t (/ (- z y) x)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -4.6e+57) {
tmp = t_1;
} else if (y <= -1.15e-88) {
tmp = t * (x / (z - y));
} else if (y <= 6e-100) {
tmp = ((x - y) * t) / z;
} else if (y <= 9.5e-49) {
tmp = t / ((z - y) / x);
} else {
tmp = t_1;
}
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 = t / (1.0d0 - (z / y))
if (y <= (-4.6d+57)) then
tmp = t_1
else if (y <= (-1.15d-88)) then
tmp = t * (x / (z - y))
else if (y <= 6d-100) then
tmp = ((x - y) * t) / z
else if (y <= 9.5d-49) then
tmp = t / ((z - y) / x)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (1.0 - (z / y));
double tmp;
if (y <= -4.6e+57) {
tmp = t_1;
} else if (y <= -1.15e-88) {
tmp = t * (x / (z - y));
} else if (y <= 6e-100) {
tmp = ((x - y) * t) / z;
} else if (y <= 9.5e-49) {
tmp = t / ((z - y) / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (1.0 - (z / y)) tmp = 0 if y <= -4.6e+57: tmp = t_1 elif y <= -1.15e-88: tmp = t * (x / (z - y)) elif y <= 6e-100: tmp = ((x - y) * t) / z elif y <= 9.5e-49: tmp = t / ((z - y) / x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(1.0 - Float64(z / y))) tmp = 0.0 if (y <= -4.6e+57) tmp = t_1; elseif (y <= -1.15e-88) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 6e-100) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= 9.5e-49) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (1.0 - (z / y)); tmp = 0.0; if (y <= -4.6e+57) tmp = t_1; elseif (y <= -1.15e-88) tmp = t * (x / (z - y)); elseif (y <= 6e-100) tmp = ((x - y) * t) / z; elseif (y <= 9.5e-49) tmp = t / ((z - y) / x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+57], t$95$1, If[LessEqual[y, -1.15e-88], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-100], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 9.5e-49], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{1 - \frac{z}{y}}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-88}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-100}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-49}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.5999999999999998e57 or 9.50000000000000006e-49 < y Initial program 99.8%
associate-*l/75.1%
associate-/l*77.1%
Simplified77.1%
associate-*r/75.1%
associate-*l/99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 79.8%
mul-1-neg79.8%
Simplified79.8%
Taylor expanded in t around 0 79.8%
if -4.5999999999999998e57 < y < -1.14999999999999993e-88Initial program 99.7%
Taylor expanded in x around inf 69.0%
if -1.14999999999999993e-88 < y < 6.0000000000000001e-100Initial program 93.8%
associate-*l/97.5%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around inf 88.7%
if 6.0000000000000001e-100 < y < 9.50000000000000006e-49Initial program 97.2%
associate-*l/90.0%
associate-/l*90.3%
Simplified90.3%
associate-*r/90.0%
associate-*l/97.2%
*-commutative97.2%
clear-num91.0%
un-div-inv91.0%
Applied egg-rr91.0%
Taylor expanded in x around inf 81.0%
Final simplification81.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.6e+60)
(/ t (- 1.0 (/ z y)))
(if (<= y -4.5e-88)
(* t (/ x (- z y)))
(if (<= y 1.35e-99)
(/ (* (- x y) t) z)
(if (<= y 1.1e-50) (/ t (/ (- z y) x)) (* t (/ y (- y z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e+60) {
tmp = t / (1.0 - (z / y));
} else if (y <= -4.5e-88) {
tmp = t * (x / (z - y));
} else if (y <= 1.35e-99) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.1e-50) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (y / (y - 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) :: tmp
if (y <= (-9.6d+60)) then
tmp = t / (1.0d0 - (z / y))
else if (y <= (-4.5d-88)) then
tmp = t * (x / (z - y))
else if (y <= 1.35d-99) then
tmp = ((x - y) * t) / z
else if (y <= 1.1d-50) then
tmp = t / ((z - y) / x)
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e+60) {
tmp = t / (1.0 - (z / y));
} else if (y <= -4.5e-88) {
tmp = t * (x / (z - y));
} else if (y <= 1.35e-99) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.1e-50) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.6e+60: tmp = t / (1.0 - (z / y)) elif y <= -4.5e-88: tmp = t * (x / (z - y)) elif y <= 1.35e-99: tmp = ((x - y) * t) / z elif y <= 1.1e-50: tmp = t / ((z - y) / x) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.6e+60) tmp = Float64(t / Float64(1.0 - Float64(z / y))); elseif (y <= -4.5e-88) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 1.35e-99) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= 1.1e-50) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.6e+60) tmp = t / (1.0 - (z / y)); elseif (y <= -4.5e-88) tmp = t * (x / (z - y)); elseif (y <= 1.35e-99) tmp = ((x - y) * t) / z; elseif (y <= 1.1e-50) tmp = t / ((z - y) / x); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.6e+60], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.5e-88], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e-99], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.1e-50], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-88}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-99}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -9.6000000000000001e60Initial program 99.7%
associate-*l/77.3%
associate-/l*72.3%
Simplified72.3%
associate-*r/77.3%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 76.6%
mul-1-neg76.6%
Simplified76.6%
Taylor expanded in t around 0 76.6%
if -9.6000000000000001e60 < y < -4.49999999999999991e-88Initial program 99.7%
Taylor expanded in x around inf 69.0%
if -4.49999999999999991e-88 < y < 1.35e-99Initial program 93.8%
associate-*l/97.5%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around inf 88.7%
if 1.35e-99 < y < 1.0999999999999999e-50Initial program 99.7%
associate-*l/88.8%
associate-/l*89.2%
Simplified89.2%
associate-*r/88.8%
associate-*l/99.7%
*-commutative99.7%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 88.8%
if 1.0999999999999999e-50 < y Initial program 99.6%
Taylor expanded in x around 0 81.8%
neg-mul-181.8%
distribute-neg-frac281.8%
Simplified81.8%
Final simplification81.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e+57)
(/ t (/ (- y z) y))
(if (<= y -5.8e-89)
(* t (/ x (- z y)))
(if (<= y 2.8e-96)
(/ (* (- x y) t) z)
(if (<= y 1.1e-50) (/ t (/ (- z y) x)) (* t (/ y (- y z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+57) {
tmp = t / ((y - z) / y);
} else if (y <= -5.8e-89) {
tmp = t * (x / (z - y));
} else if (y <= 2.8e-96) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.1e-50) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (y / (y - 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) :: tmp
if (y <= (-8d+57)) then
tmp = t / ((y - z) / y)
else if (y <= (-5.8d-89)) then
tmp = t * (x / (z - y))
else if (y <= 2.8d-96) then
tmp = ((x - y) * t) / z
else if (y <= 1.1d-50) then
tmp = t / ((z - y) / x)
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e+57) {
tmp = t / ((y - z) / y);
} else if (y <= -5.8e-89) {
tmp = t * (x / (z - y));
} else if (y <= 2.8e-96) {
tmp = ((x - y) * t) / z;
} else if (y <= 1.1e-50) {
tmp = t / ((z - y) / x);
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e+57: tmp = t / ((y - z) / y) elif y <= -5.8e-89: tmp = t * (x / (z - y)) elif y <= 2.8e-96: tmp = ((x - y) * t) / z elif y <= 1.1e-50: tmp = t / ((z - y) / x) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e+57) tmp = Float64(t / Float64(Float64(y - z) / y)); elseif (y <= -5.8e-89) tmp = Float64(t * Float64(x / Float64(z - y))); elseif (y <= 2.8e-96) tmp = Float64(Float64(Float64(x - y) * t) / z); elseif (y <= 1.1e-50) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e+57) tmp = t / ((y - z) / y); elseif (y <= -5.8e-89) tmp = t * (x / (z - y)); elseif (y <= 2.8e-96) tmp = ((x - y) * t) / z; elseif (y <= 1.1e-50) tmp = t / ((z - y) / x); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e+57], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.8e-89], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-96], N[(N[(N[(x - y), $MachinePrecision] * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.1e-50], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+57}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-89}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-96}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-50}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -8.00000000000000039e57Initial program 99.7%
associate-*l/77.3%
associate-/l*72.3%
Simplified72.3%
associate-*r/77.3%
associate-*l/99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 76.6%
mul-1-neg76.6%
Simplified76.6%
if -8.00000000000000039e57 < y < -5.79999999999999984e-89Initial program 99.7%
Taylor expanded in x around inf 69.0%
if -5.79999999999999984e-89 < y < 2.80000000000000015e-96Initial program 93.8%
associate-*l/97.5%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around inf 88.7%
if 2.80000000000000015e-96 < y < 1.0999999999999999e-50Initial program 99.7%
associate-*l/88.8%
associate-/l*89.2%
Simplified89.2%
associate-*r/88.8%
associate-*l/99.7%
*-commutative99.7%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 88.8%
if 1.0999999999999999e-50 < y Initial program 99.6%
Taylor expanded in x around 0 81.8%
neg-mul-181.8%
distribute-neg-frac281.8%
Simplified81.8%
Final simplification81.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.9e+77)
t
(if (<= y -1250000000.0)
(* t (/ x (- y)))
(if (<= y -0.00024) t (if (<= y 7.8e-29) (/ t (/ z x)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e+77) {
tmp = t;
} else if (y <= -1250000000.0) {
tmp = t * (x / -y);
} else if (y <= -0.00024) {
tmp = t;
} else if (y <= 7.8e-29) {
tmp = t / (z / x);
} else {
tmp = 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 (y <= (-2.9d+77)) then
tmp = t
else if (y <= (-1250000000.0d0)) then
tmp = t * (x / -y)
else if (y <= (-0.00024d0)) then
tmp = t
else if (y <= 7.8d-29) then
tmp = t / (z / x)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e+77) {
tmp = t;
} else if (y <= -1250000000.0) {
tmp = t * (x / -y);
} else if (y <= -0.00024) {
tmp = t;
} else if (y <= 7.8e-29) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e+77: tmp = t elif y <= -1250000000.0: tmp = t * (x / -y) elif y <= -0.00024: tmp = t elif y <= 7.8e-29: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e+77) tmp = t; elseif (y <= -1250000000.0) tmp = Float64(t * Float64(x / Float64(-y))); elseif (y <= -0.00024) tmp = t; elseif (y <= 7.8e-29) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.9e+77) tmp = t; elseif (y <= -1250000000.0) tmp = t * (x / -y); elseif (y <= -0.00024) tmp = t; elseif (y <= 7.8e-29) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e+77], t, If[LessEqual[y, -1250000000.0], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.00024], t, If[LessEqual[y, 7.8e-29], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+77}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1250000000:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{elif}\;y \leq -0.00024:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-29}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.9000000000000002e77 or -1.25e9 < y < -2.40000000000000006e-4 or 7.7999999999999995e-29 < y Initial program 99.8%
associate-*l/74.7%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in y around inf 61.5%
if -2.9000000000000002e77 < y < -1.25e9Initial program 99.7%
Taylor expanded in z around 0 51.3%
mul-1-neg51.3%
div-sub51.3%
sub-neg51.3%
*-inverses51.3%
metadata-eval51.3%
Simplified51.3%
Taylor expanded in x around inf 42.8%
*-commutative42.8%
associate-*l/51.9%
associate-*l*51.9%
*-commutative51.9%
associate-*l*51.9%
neg-mul-151.9%
Simplified51.9%
if -2.40000000000000006e-4 < y < 7.7999999999999995e-29Initial program 95.3%
associate-*l/94.8%
associate-/l*93.9%
Simplified93.9%
associate-*r/94.8%
associate-*l/95.3%
*-commutative95.3%
clear-num94.7%
un-div-inv94.8%
Applied egg-rr94.8%
Taylor expanded in y around 0 69.4%
Final simplification64.6%
(FPCore (x y z t) :precision binary64 (if (<= y -3.8e+214) (/ t (/ (- y z) y)) (if (<= y 8e+120) (* (- y x) (/ t (- y z))) (* t (/ y (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.8e+214) {
tmp = t / ((y - z) / y);
} else if (y <= 8e+120) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t * (y / (y - 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) :: tmp
if (y <= (-3.8d+214)) then
tmp = t / ((y - z) / y)
else if (y <= 8d+120) then
tmp = (y - x) * (t / (y - z))
else
tmp = t * (y / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.8e+214) {
tmp = t / ((y - z) / y);
} else if (y <= 8e+120) {
tmp = (y - x) * (t / (y - z));
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.8e+214: tmp = t / ((y - z) / y) elif y <= 8e+120: tmp = (y - x) * (t / (y - z)) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.8e+214) tmp = Float64(t / Float64(Float64(y - z) / y)); elseif (y <= 8e+120) tmp = Float64(Float64(y - x) * Float64(t / Float64(y - z))); else tmp = Float64(t * Float64(y / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.8e+214) tmp = t / ((y - z) / y); elseif (y <= 8e+120) tmp = (y - x) * (t / (y - z)); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.8e+214], N[(t / N[(N[(y - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+120], N[(N[(y - x), $MachinePrecision] * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+214}:\\
\;\;\;\;\frac{t}{\frac{y - z}{y}}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+120}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -3.79999999999999997e214Initial program 99.8%
associate-*l/78.4%
associate-/l*40.5%
Simplified40.5%
associate-*r/78.4%
associate-*l/99.8%
*-commutative99.8%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
if -3.79999999999999997e214 < y < 7.9999999999999998e120Initial program 97.2%
associate-*l/89.9%
associate-/l*90.3%
Simplified90.3%
if 7.9999999999999998e120 < y Initial program 99.9%
Taylor expanded in x around 0 95.0%
neg-mul-195.0%
distribute-neg-frac295.0%
Simplified95.0%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.2e-8) (not (<= z 2.1e+29))) (* (- x y) (/ t z)) (* t (- 1.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.2e-8) || !(z <= 2.1e+29)) {
tmp = (x - y) * (t / z);
} else {
tmp = t * (1.0 - (x / y));
}
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 <= (-4.2d-8)) .or. (.not. (z <= 2.1d+29))) then
tmp = (x - y) * (t / z)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.2e-8) || !(z <= 2.1e+29)) {
tmp = (x - y) * (t / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.2e-8) or not (z <= 2.1e+29): tmp = (x - y) * (t / z) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.2e-8) || !(z <= 2.1e+29)) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.2e-8) || ~((z <= 2.1e+29))) tmp = (x - y) * (t / z); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.2e-8], N[Not[LessEqual[z, 2.1e+29]], $MachinePrecision]], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-8} \lor \neg \left(z \leq 2.1 \cdot 10^{+29}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if z < -4.19999999999999989e-8 or 2.1000000000000002e29 < z Initial program 97.2%
associate-*l/82.1%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in z around inf 67.7%
*-commutative67.7%
associate-/l*72.0%
Simplified72.0%
if -4.19999999999999989e-8 < z < 2.1000000000000002e29Initial program 98.4%
Taylor expanded in z around 0 78.9%
mul-1-neg78.9%
div-sub78.9%
sub-neg78.9%
*-inverses78.9%
metadata-eval78.9%
Simplified78.9%
Taylor expanded in x around 0 74.8%
mul-1-neg74.8%
distribute-frac-neg274.8%
associate-*r/78.9%
*-rgt-identity78.9%
distribute-frac-neg278.9%
mul-1-neg78.9%
distribute-lft-in78.9%
mul-1-neg78.9%
sub-neg78.9%
Simplified78.9%
Final simplification75.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5e-10) (not (<= z 5e+28))) (* t (/ (- x y) z)) (* t (- 1.0 (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5e-10) || !(z <= 5e+28)) {
tmp = t * ((x - y) / z);
} else {
tmp = t * (1.0 - (x / y));
}
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 <= (-5d-10)) .or. (.not. (z <= 5d+28))) then
tmp = t * ((x - y) / z)
else
tmp = t * (1.0d0 - (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5e-10) || !(z <= 5e+28)) {
tmp = t * ((x - y) / z);
} else {
tmp = t * (1.0 - (x / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5e-10) or not (z <= 5e+28): tmp = t * ((x - y) / z) else: tmp = t * (1.0 - (x / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5e-10) || !(z <= 5e+28)) tmp = Float64(t * Float64(Float64(x - y) / z)); else tmp = Float64(t * Float64(1.0 - Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -5e-10) || ~((z <= 5e+28))) tmp = t * ((x - y) / z); else tmp = t * (1.0 - (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5e-10], N[Not[LessEqual[z, 5e+28]], $MachinePrecision]], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(1.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-10} \lor \neg \left(z \leq 5 \cdot 10^{+28}\right):\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(1 - \frac{x}{y}\right)\\
\end{array}
\end{array}
if z < -5.00000000000000031e-10 or 4.99999999999999957e28 < z Initial program 97.2%
Taylor expanded in z around inf 77.0%
if -5.00000000000000031e-10 < z < 4.99999999999999957e28Initial program 98.4%
Taylor expanded in z around 0 78.9%
mul-1-neg78.9%
div-sub78.9%
sub-neg78.9%
*-inverses78.9%
metadata-eval78.9%
Simplified78.9%
Taylor expanded in x around 0 74.8%
mul-1-neg74.8%
distribute-frac-neg274.8%
associate-*r/78.9%
*-rgt-identity78.9%
distribute-frac-neg278.9%
mul-1-neg78.9%
distribute-lft-in78.9%
mul-1-neg78.9%
sub-neg78.9%
Simplified78.9%
Final simplification78.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.3e+61) (not (<= y 1.08e-50))) (/ t (- 1.0 (/ z y))) (* t (/ x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.3e+61) || !(y <= 1.08e-50)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t * (x / (z - y));
}
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 ((y <= (-3.3d+61)) .or. (.not. (y <= 1.08d-50))) then
tmp = t / (1.0d0 - (z / y))
else
tmp = t * (x / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.3e+61) || !(y <= 1.08e-50)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.3e+61) or not (y <= 1.08e-50): tmp = t / (1.0 - (z / y)) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.3e+61) || !(y <= 1.08e-50)) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(t * Float64(x / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.3e+61) || ~((y <= 1.08e-50))) tmp = t / (1.0 - (z / y)); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.3e+61], N[Not[LessEqual[y, 1.08e-50]], $MachinePrecision]], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+61} \lor \neg \left(y \leq 1.08 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -3.2999999999999998e61 or 1.0799999999999999e-50 < y Initial program 99.6%
associate-*l/75.3%
associate-/l*77.3%
Simplified77.3%
associate-*r/75.3%
associate-*l/99.6%
*-commutative99.6%
clear-num99.1%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 79.3%
mul-1-neg79.3%
Simplified79.3%
Taylor expanded in t around 0 79.3%
if -3.2999999999999998e61 < y < 1.0799999999999999e-50Initial program 95.8%
Taylor expanded in x around inf 79.8%
Final simplification79.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3e+62) (not (<= y 1.1e-50))) (/ t (- 1.0 (/ z y))) (/ t (/ (- z y) x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3e+62) || !(y <= 1.1e-50)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t / ((z - y) / 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 ((y <= (-3d+62)) .or. (.not. (y <= 1.1d-50))) then
tmp = t / (1.0d0 - (z / y))
else
tmp = t / ((z - y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3e+62) || !(y <= 1.1e-50)) {
tmp = t / (1.0 - (z / y));
} else {
tmp = t / ((z - y) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3e+62) or not (y <= 1.1e-50): tmp = t / (1.0 - (z / y)) else: tmp = t / ((z - y) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3e+62) || !(y <= 1.1e-50)) tmp = Float64(t / Float64(1.0 - Float64(z / y))); else tmp = Float64(t / Float64(Float64(z - y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3e+62) || ~((y <= 1.1e-50))) tmp = t / (1.0 - (z / y)); else tmp = t / ((z - y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3e+62], N[Not[LessEqual[y, 1.1e-50]], $MachinePrecision]], N[(t / N[(1.0 - N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+62} \lor \neg \left(y \leq 1.1 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{t}{1 - \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\end{array}
\end{array}
if y < -3e62 or 1.0999999999999999e-50 < y Initial program 99.6%
associate-*l/75.3%
associate-/l*77.3%
Simplified77.3%
associate-*r/75.3%
associate-*l/99.6%
*-commutative99.6%
clear-num99.1%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 79.3%
mul-1-neg79.3%
Simplified79.3%
Taylor expanded in t around 0 79.3%
if -3e62 < y < 1.0999999999999999e-50Initial program 95.8%
associate-*l/94.3%
associate-/l*93.4%
Simplified93.4%
associate-*r/94.3%
associate-*l/95.8%
*-commutative95.8%
clear-num95.7%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in x around inf 79.9%
Final simplification79.6%
(FPCore (x y z t) :precision binary64 (if (<= y -0.35) t (if (<= y 7.2e-29) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.35) {
tmp = t;
} else if (y <= 7.2e-29) {
tmp = x * (t / z);
} else {
tmp = 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 (y <= (-0.35d0)) then
tmp = t
else if (y <= 7.2d-29) then
tmp = x * (t / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.35) {
tmp = t;
} else if (y <= 7.2e-29) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.35: tmp = t elif y <= 7.2e-29: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.35) tmp = t; elseif (y <= 7.2e-29) tmp = Float64(x * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.35) tmp = t; elseif (y <= 7.2e-29) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.35], t, If[LessEqual[y, 7.2e-29], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.35:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-29}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -0.34999999999999998 or 7.19999999999999948e-29 < y Initial program 99.8%
associate-*l/75.8%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around inf 57.5%
if -0.34999999999999998 < y < 7.19999999999999948e-29Initial program 95.3%
associate-*l/94.8%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in y around 0 67.8%
*-commutative67.8%
associate-/l*67.1%
Simplified67.1%
Final simplification61.7%
(FPCore (x y z t) :precision binary64 (if (<= y -0.42) t (if (<= y 4.8e-29) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.42) {
tmp = t;
} else if (y <= 4.8e-29) {
tmp = t * (x / z);
} else {
tmp = 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 (y <= (-0.42d0)) then
tmp = t
else if (y <= 4.8d-29) then
tmp = t * (x / z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.42) {
tmp = t;
} else if (y <= 4.8e-29) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.42: tmp = t elif y <= 4.8e-29: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.42) tmp = t; elseif (y <= 4.8e-29) tmp = Float64(t * Float64(x / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.42) tmp = t; elseif (y <= 4.8e-29) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.42], t, If[LessEqual[y, 4.8e-29], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.42:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-29}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -0.419999999999999984 or 4.79999999999999984e-29 < y Initial program 99.8%
associate-*l/75.8%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around inf 57.5%
if -0.419999999999999984 < y < 4.79999999999999984e-29Initial program 95.3%
Taylor expanded in y around 0 69.3%
Final simplification62.7%
(FPCore (x y z t) :precision binary64 (if (<= y -0.045) t (if (<= y 7.2e-29) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.045) {
tmp = t;
} else if (y <= 7.2e-29) {
tmp = t / (z / x);
} else {
tmp = 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 (y <= (-0.045d0)) then
tmp = t
else if (y <= 7.2d-29) then
tmp = t / (z / x)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.045) {
tmp = t;
} else if (y <= 7.2e-29) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.045: tmp = t elif y <= 7.2e-29: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.045) tmp = t; elseif (y <= 7.2e-29) tmp = Float64(t / Float64(z / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.045) tmp = t; elseif (y <= 7.2e-29) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.045], t, If[LessEqual[y, 7.2e-29], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.045:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-29}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -0.044999999999999998 or 7.19999999999999948e-29 < y Initial program 99.8%
associate-*l/75.8%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around inf 57.5%
if -0.044999999999999998 < y < 7.19999999999999948e-29Initial program 95.3%
associate-*l/94.8%
associate-/l*93.9%
Simplified93.9%
associate-*r/94.8%
associate-*l/95.3%
*-commutative95.3%
clear-num94.7%
un-div-inv94.8%
Applied egg-rr94.8%
Taylor expanded in y around 0 69.4%
Final simplification62.7%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return 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 = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.8%
associate-*l/84.1%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in y around inf 36.6%
Final simplification36.6%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
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 = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024079
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))