
(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 17 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 (/ 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}
Initial program 96.9%
associate-*l/84.7%
associate-/l*85.9%
Simplified85.9%
associate-*r/84.7%
associate-*l/96.9%
*-commutative96.9%
clear-num96.8%
un-div-inv97.1%
Applied egg-rr97.1%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x (- y)))))
(if (<= y -7.2e+96)
t
(if (<= y -1.02e-81)
t_1
(if (<= y 7.5e-7) (/ x (/ z t)) (if (<= y 3.1e+71) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / -y);
double tmp;
if (y <= -7.2e+96) {
tmp = t;
} else if (y <= -1.02e-81) {
tmp = t_1;
} else if (y <= 7.5e-7) {
tmp = x / (z / t);
} else if (y <= 3.1e+71) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (x / -y)
if (y <= (-7.2d+96)) then
tmp = t
else if (y <= (-1.02d-81)) then
tmp = t_1
else if (y <= 7.5d-7) then
tmp = x / (z / t)
else if (y <= 3.1d+71) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t * (x / -y);
double tmp;
if (y <= -7.2e+96) {
tmp = t;
} else if (y <= -1.02e-81) {
tmp = t_1;
} else if (y <= 7.5e-7) {
tmp = x / (z / t);
} else if (y <= 3.1e+71) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / -y) tmp = 0 if y <= -7.2e+96: tmp = t elif y <= -1.02e-81: tmp = t_1 elif y <= 7.5e-7: tmp = x / (z / t) elif y <= 3.1e+71: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / Float64(-y))) tmp = 0.0 if (y <= -7.2e+96) tmp = t; elseif (y <= -1.02e-81) tmp = t_1; elseif (y <= 7.5e-7) tmp = Float64(x / Float64(z / t)); elseif (y <= 3.1e+71) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / -y); tmp = 0.0; if (y <= -7.2e+96) tmp = t; elseif (y <= -1.02e-81) tmp = t_1; elseif (y <= 7.5e-7) tmp = x / (z / t); elseif (y <= 3.1e+71) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e+96], t, If[LessEqual[y, -1.02e-81], t$95$1, If[LessEqual[y, 7.5e-7], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+71], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{-y}\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{+96}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.20000000000000026e96 or 3.10000000000000018e71 < y Initial program 99.9%
associate-*l/74.8%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in y around inf 68.1%
if -7.20000000000000026e96 < y < -1.01999999999999998e-81 or 7.5000000000000002e-7 < y < 3.10000000000000018e71Initial program 97.8%
associate-*l/91.1%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in z around 0 57.1%
associate-*r/57.1%
neg-mul-157.1%
Simplified57.1%
Taylor expanded in x around inf 47.0%
mul-1-neg47.0%
associate-/l*50.3%
distribute-rgt-neg-in50.3%
distribute-frac-neg50.3%
Simplified50.3%
if -1.01999999999999998e-81 < y < 7.5000000000000002e-7Initial program 94.4%
associate-*l/88.7%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 69.2%
frac-2neg69.2%
neg-sub069.2%
div-sub69.2%
add-sqr-sqrt39.5%
sqrt-unprod32.0%
sqr-neg32.0%
sqrt-unprod12.4%
add-sqr-sqrt16.5%
frac-2neg16.5%
*-commutative16.5%
associate-/l*16.5%
Applied egg-rr16.5%
div016.5%
neg-sub016.5%
distribute-rgt-neg-in16.5%
Simplified16.5%
add-sqr-sqrt12.5%
sqrt-unprod34.7%
sqr-neg34.7%
sqrt-unprod35.6%
add-sqr-sqrt76.3%
clear-num76.2%
un-div-inv76.9%
Applied egg-rr76.9%
Final simplification68.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.2e+97)
t
(if (<= y -6.3e-84)
(/ t (/ y (- x)))
(if (<= y 450.0) (/ x (/ z t)) (if (<= y 3e+71) (* t (/ x (- y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+97) {
tmp = t;
} else if (y <= -6.3e-84) {
tmp = t / (y / -x);
} else if (y <= 450.0) {
tmp = x / (z / t);
} else if (y <= 3e+71) {
tmp = t * (x / -y);
} 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 <= (-4.2d+97)) then
tmp = t
else if (y <= (-6.3d-84)) then
tmp = t / (y / -x)
else if (y <= 450.0d0) then
tmp = x / (z / t)
else if (y <= 3d+71) then
tmp = t * (x / -y)
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 <= -4.2e+97) {
tmp = t;
} else if (y <= -6.3e-84) {
tmp = t / (y / -x);
} else if (y <= 450.0) {
tmp = x / (z / t);
} else if (y <= 3e+71) {
tmp = t * (x / -y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.2e+97: tmp = t elif y <= -6.3e-84: tmp = t / (y / -x) elif y <= 450.0: tmp = x / (z / t) elif y <= 3e+71: tmp = t * (x / -y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+97) tmp = t; elseif (y <= -6.3e-84) tmp = Float64(t / Float64(y / Float64(-x))); elseif (y <= 450.0) tmp = Float64(x / Float64(z / t)); elseif (y <= 3e+71) tmp = Float64(t * Float64(x / Float64(-y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.2e+97) tmp = t; elseif (y <= -6.3e-84) tmp = t / (y / -x); elseif (y <= 450.0) tmp = x / (z / t); elseif (y <= 3e+71) tmp = t * (x / -y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+97], t, If[LessEqual[y, -6.3e-84], N[(t / N[(y / (-x)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 450.0], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+71], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+97}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -6.3 \cdot 10^{-84}:\\
\;\;\;\;\frac{t}{\frac{y}{-x}}\\
\mathbf{elif}\;y \leq 450:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.20000000000000023e97 or 3.00000000000000013e71 < y Initial program 99.9%
associate-*l/74.8%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in y around inf 68.1%
if -4.20000000000000023e97 < y < -6.3000000000000004e-84Initial program 96.7%
associate-*l/96.6%
associate-/l*96.7%
Simplified96.7%
associate-*r/96.6%
associate-*l/96.7%
*-commutative96.7%
clear-num96.6%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in x around inf 61.5%
Taylor expanded in z around 0 49.6%
neg-mul-149.6%
distribute-neg-frac49.6%
Simplified49.6%
if -6.3000000000000004e-84 < y < 450Initial program 94.4%
associate-*l/88.7%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 69.2%
frac-2neg69.2%
neg-sub069.2%
div-sub69.2%
add-sqr-sqrt39.5%
sqrt-unprod32.0%
sqr-neg32.0%
sqrt-unprod12.4%
add-sqr-sqrt16.5%
frac-2neg16.5%
*-commutative16.5%
associate-/l*16.5%
Applied egg-rr16.5%
div016.5%
neg-sub016.5%
distribute-rgt-neg-in16.5%
Simplified16.5%
add-sqr-sqrt12.5%
sqrt-unprod34.7%
sqr-neg34.7%
sqrt-unprod35.6%
add-sqr-sqrt76.3%
clear-num76.2%
un-div-inv76.9%
Applied egg-rr76.9%
if 450 < y < 3.00000000000000013e71Initial program 99.4%
associate-*l/83.2%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in z around 0 56.0%
associate-*r/56.0%
neg-mul-156.0%
Simplified56.0%
Taylor expanded in x around inf 39.1%
mul-1-neg39.1%
associate-/l*51.4%
distribute-rgt-neg-in51.4%
distribute-frac-neg51.4%
Simplified51.4%
Final simplification68.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.1e+97)
t
(if (<= y -9.6e-82)
(/ (* x (- t)) y)
(if (<= y 0.0105)
(/ x (/ z t))
(if (<= y 3.1e+72) (* t (/ x (- y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.1e+97) {
tmp = t;
} else if (y <= -9.6e-82) {
tmp = (x * -t) / y;
} else if (y <= 0.0105) {
tmp = x / (z / t);
} else if (y <= 3.1e+72) {
tmp = t * (x / -y);
} 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.1d+97)) then
tmp = t
else if (y <= (-9.6d-82)) then
tmp = (x * -t) / y
else if (y <= 0.0105d0) then
tmp = x / (z / t)
else if (y <= 3.1d+72) then
tmp = t * (x / -y)
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.1e+97) {
tmp = t;
} else if (y <= -9.6e-82) {
tmp = (x * -t) / y;
} else if (y <= 0.0105) {
tmp = x / (z / t);
} else if (y <= 3.1e+72) {
tmp = t * (x / -y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.1e+97: tmp = t elif y <= -9.6e-82: tmp = (x * -t) / y elif y <= 0.0105: tmp = x / (z / t) elif y <= 3.1e+72: tmp = t * (x / -y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.1e+97) tmp = t; elseif (y <= -9.6e-82) tmp = Float64(Float64(x * Float64(-t)) / y); elseif (y <= 0.0105) tmp = Float64(x / Float64(z / t)); elseif (y <= 3.1e+72) tmp = Float64(t * Float64(x / Float64(-y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.1e+97) tmp = t; elseif (y <= -9.6e-82) tmp = (x * -t) / y; elseif (y <= 0.0105) tmp = x / (z / t); elseif (y <= 3.1e+72) tmp = t * (x / -y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.1e+97], t, If[LessEqual[y, -9.6e-82], N[(N[(x * (-t)), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 0.0105], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+72], N[(t * N[(x / (-y)), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+97}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -9.6 \cdot 10^{-82}:\\
\;\;\;\;\frac{x \cdot \left(-t\right)}{y}\\
\mathbf{elif}\;y \leq 0.0105:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+72}:\\
\;\;\;\;t \cdot \frac{x}{-y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.10000000000000012e97 or 3.09999999999999988e72 < y Initial program 99.9%
associate-*l/74.8%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in y around inf 68.1%
if -2.10000000000000012e97 < y < -9.60000000000000033e-82Initial program 96.7%
associate-*l/96.6%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in z around 0 57.8%
associate-*r/57.8%
neg-mul-157.8%
Simplified57.8%
Taylor expanded in x around inf 52.4%
associate-*r/52.4%
mul-1-neg52.4%
Simplified52.4%
if -9.60000000000000033e-82 < y < 0.0105000000000000007Initial program 94.4%
associate-*l/88.7%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 69.2%
frac-2neg69.2%
neg-sub069.2%
div-sub69.2%
add-sqr-sqrt39.5%
sqrt-unprod32.0%
sqr-neg32.0%
sqrt-unprod12.4%
add-sqr-sqrt16.5%
frac-2neg16.5%
*-commutative16.5%
associate-/l*16.5%
Applied egg-rr16.5%
div016.5%
neg-sub016.5%
distribute-rgt-neg-in16.5%
Simplified16.5%
add-sqr-sqrt12.5%
sqrt-unprod34.7%
sqr-neg34.7%
sqrt-unprod35.6%
add-sqr-sqrt76.3%
clear-num76.2%
un-div-inv76.9%
Applied egg-rr76.9%
if 0.0105000000000000007 < y < 3.09999999999999988e72Initial program 99.4%
associate-*l/83.2%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in z around 0 56.0%
associate-*r/56.0%
neg-mul-156.0%
Simplified56.0%
Taylor expanded in x around inf 39.1%
mul-1-neg39.1%
associate-/l*51.4%
distribute-rgt-neg-in51.4%
distribute-frac-neg51.4%
Simplified51.4%
Final simplification68.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.5e+96)
t
(if (<= y -0.0037)
(* (/ y z) (- t))
(if (<= y -1.95e-10) t (if (<= y 8.6e+68) (* t (/ x z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.5e+96) {
tmp = t;
} else if (y <= -0.0037) {
tmp = (y / z) * -t;
} else if (y <= -1.95e-10) {
tmp = t;
} else if (y <= 8.6e+68) {
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 <= (-6.5d+96)) then
tmp = t
else if (y <= (-0.0037d0)) then
tmp = (y / z) * -t
else if (y <= (-1.95d-10)) then
tmp = t
else if (y <= 8.6d+68) 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 <= -6.5e+96) {
tmp = t;
} else if (y <= -0.0037) {
tmp = (y / z) * -t;
} else if (y <= -1.95e-10) {
tmp = t;
} else if (y <= 8.6e+68) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.5e+96: tmp = t elif y <= -0.0037: tmp = (y / z) * -t elif y <= -1.95e-10: tmp = t elif y <= 8.6e+68: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.5e+96) tmp = t; elseif (y <= -0.0037) tmp = Float64(Float64(y / z) * Float64(-t)); elseif (y <= -1.95e-10) tmp = t; elseif (y <= 8.6e+68) 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 <= -6.5e+96) tmp = t; elseif (y <= -0.0037) tmp = (y / z) * -t; elseif (y <= -1.95e-10) tmp = t; elseif (y <= 8.6e+68) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.5e+96], t, If[LessEqual[y, -0.0037], N[(N[(y / z), $MachinePrecision] * (-t)), $MachinePrecision], If[LessEqual[y, -1.95e-10], t, If[LessEqual[y, 8.6e+68], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+96}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -0.0037:\\
\;\;\;\;\frac{y}{z} \cdot \left(-t\right)\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-10}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{+68}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -6.5e96 or -0.0037000000000000002 < y < -1.95e-10 or 8.6000000000000002e68 < y Initial program 99.9%
associate-*l/74.6%
associate-/l*66.4%
Simplified66.4%
Taylor expanded in y around inf 68.1%
if -6.5e96 < y < -0.0037000000000000002Initial program 99.7%
associate-*l/99.7%
associate-/l*94.6%
Simplified94.6%
Taylor expanded in z around inf 48.2%
*-commutative48.2%
associate-/l*48.2%
Simplified48.2%
Taylor expanded in x around 0 44.1%
mul-1-neg44.1%
associate-/l*39.3%
distribute-rgt-neg-in39.3%
Simplified39.3%
if -1.95e-10 < y < 8.6000000000000002e68Initial program 94.9%
Taylor expanded in y around 0 67.9%
Final simplification66.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))))
(if (<= y -2e+191)
t_1
(if (<= y -2.3e-10)
(- t (/ (* t x) y))
(if (<= y 1.1e+115) (/ t (/ (- z y) x)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double tmp;
if (y <= -2e+191) {
tmp = t_1;
} else if (y <= -2.3e-10) {
tmp = t - ((t * x) / y);
} else if (y <= 1.1e+115) {
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 * (y / (y - z))
if (y <= (-2d+191)) then
tmp = t_1
else if (y <= (-2.3d-10)) then
tmp = t - ((t * x) / y)
else if (y <= 1.1d+115) 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 * (y / (y - z));
double tmp;
if (y <= -2e+191) {
tmp = t_1;
} else if (y <= -2.3e-10) {
tmp = t - ((t * x) / y);
} else if (y <= 1.1e+115) {
tmp = t / ((z - y) / x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) tmp = 0 if y <= -2e+191: tmp = t_1 elif y <= -2.3e-10: tmp = t - ((t * x) / y) elif y <= 1.1e+115: tmp = t / ((z - y) / x) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) tmp = 0.0 if (y <= -2e+191) tmp = t_1; elseif (y <= -2.3e-10) tmp = Float64(t - Float64(Float64(t * x) / y)); elseif (y <= 1.1e+115) 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 * (y / (y - z)); tmp = 0.0; if (y <= -2e+191) tmp = t_1; elseif (y <= -2.3e-10) tmp = t - ((t * x) / y); elseif (y <= 1.1e+115) 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[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+191], t$95$1, If[LessEqual[y, -2.3e-10], N[(t - N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+115], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
\mathbf{if}\;y \leq -2 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-10}:\\
\;\;\;\;t - \frac{t \cdot x}{y}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+115}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.00000000000000015e191 or 1.1e115 < y Initial program 99.9%
Taylor expanded in x around 0 92.7%
neg-mul-192.7%
distribute-neg-frac292.7%
Simplified92.7%
if -2.00000000000000015e191 < y < -2.30000000000000007e-10Initial program 99.7%
associate-*l/96.9%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in z around 0 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Taylor expanded in x around 0 72.8%
mul-1-neg72.8%
sub-neg72.8%
Simplified72.8%
if -2.30000000000000007e-10 < y < 1.1e115Initial program 95.1%
associate-*l/88.7%
associate-/l*95.5%
Simplified95.5%
associate-*r/88.7%
associate-*l/95.1%
*-commutative95.1%
clear-num95.0%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 83.9%
Final simplification84.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.6e+193)
(/ t (- (/ (- z) y) -1.0))
(if (<= y -1.45e-10)
(- t (/ (* t x) y))
(if (<= y 2e+115) (/ t (/ (- z y) x)) (* t (/ y (- y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e+193) {
tmp = t / ((-z / y) - -1.0);
} else if (y <= -1.45e-10) {
tmp = t - ((t * x) / y);
} else if (y <= 2e+115) {
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+193)) then
tmp = t / ((-z / y) - (-1.0d0))
else if (y <= (-1.45d-10)) then
tmp = t - ((t * x) / y)
else if (y <= 2d+115) 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+193) {
tmp = t / ((-z / y) - -1.0);
} else if (y <= -1.45e-10) {
tmp = t - ((t * x) / y);
} else if (y <= 2e+115) {
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+193: tmp = t / ((-z / y) - -1.0) elif y <= -1.45e-10: tmp = t - ((t * x) / y) elif y <= 2e+115: 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+193) tmp = Float64(t / Float64(Float64(Float64(-z) / y) - -1.0)); elseif (y <= -1.45e-10) tmp = Float64(t - Float64(Float64(t * x) / y)); elseif (y <= 2e+115) 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+193) tmp = t / ((-z / y) - -1.0); elseif (y <= -1.45e-10) tmp = t - ((t * x) / y); elseif (y <= 2e+115) 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+193], N[(t / N[(N[((-z) / y), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-10], N[(t - N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+115], 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^{+193}:\\
\;\;\;\;\frac{t}{\frac{-z}{y} - -1}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-10}:\\
\;\;\;\;t - \frac{t \cdot x}{y}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -9.6e193Initial program 99.9%
associate-*l/65.8%
associate-/l*62.6%
Simplified62.6%
associate-*r/65.8%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 95.4%
mul-1-neg95.4%
div-sub95.5%
sub-neg95.5%
*-inverses95.5%
metadata-eval95.5%
Simplified95.5%
if -9.6e193 < y < -1.4499999999999999e-10Initial program 99.7%
associate-*l/96.9%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in z around 0 64.6%
associate-*r/64.6%
neg-mul-164.6%
Simplified64.6%
Taylor expanded in x around 0 72.8%
mul-1-neg72.8%
sub-neg72.8%
Simplified72.8%
if -1.4499999999999999e-10 < y < 2e115Initial program 95.1%
associate-*l/88.7%
associate-/l*95.5%
Simplified95.5%
associate-*r/88.7%
associate-*l/95.1%
*-commutative95.1%
clear-num95.0%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 83.9%
if 2e115 < y Initial program 99.9%
Taylor expanded in x around 0 91.1%
neg-mul-191.1%
distribute-neg-frac291.1%
Simplified91.1%
Final simplification84.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.8e+204) (/ t (- (/ (- z) y) -1.0)) (if (<= y 1.35e+132) (* (- x y) (/ t (- z y))) (* t (/ y (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e+204) {
tmp = t / ((-z / y) - -1.0);
} else if (y <= 1.35e+132) {
tmp = (x - y) * (t / (z - y));
} 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 <= (-1.8d+204)) then
tmp = t / ((-z / y) - (-1.0d0))
else if (y <= 1.35d+132) then
tmp = (x - y) * (t / (z - y))
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 <= -1.8e+204) {
tmp = t / ((-z / y) - -1.0);
} else if (y <= 1.35e+132) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.8e+204: tmp = t / ((-z / y) - -1.0) elif y <= 1.35e+132: tmp = (x - y) * (t / (z - y)) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.8e+204) tmp = Float64(t / Float64(Float64(Float64(-z) / y) - -1.0)); elseif (y <= 1.35e+132) tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); 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 <= -1.8e+204) tmp = t / ((-z / y) - -1.0); elseif (y <= 1.35e+132) tmp = (x - y) * (t / (z - y)); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.8e+204], N[(t / N[(N[((-z) / y), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+132], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+204}:\\
\;\;\;\;\frac{t}{\frac{-z}{y} - -1}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+132}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if y < -1.8000000000000001e204Initial program 99.9%
associate-*l/64.3%
associate-/l*60.8%
Simplified60.8%
associate-*r/64.3%
associate-*l/99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 95.2%
mul-1-neg95.2%
div-sub95.3%
sub-neg95.3%
*-inverses95.3%
metadata-eval95.3%
Simplified95.3%
if -1.8000000000000001e204 < y < 1.35e132Initial program 96.0%
associate-*l/90.2%
associate-/l*93.4%
Simplified93.4%
if 1.35e132 < y Initial program 99.9%
Taylor expanded in x around 0 91.1%
neg-mul-191.1%
distribute-neg-frac291.1%
Simplified91.1%
Final simplification93.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.2e-10) (not (<= y 1.1e+115))) (- t (/ (* t x) y)) (* t (/ x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e-10) || !(y <= 1.1e+115)) {
tmp = t - ((t * x) / 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 <= (-2.2d-10)) .or. (.not. (y <= 1.1d+115))) then
tmp = t - ((t * x) / 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 <= -2.2e-10) || !(y <= 1.1e+115)) {
tmp = t - ((t * x) / y);
} else {
tmp = t * (x / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.2e-10) or not (y <= 1.1e+115): tmp = t - ((t * x) / y) else: tmp = t * (x / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.2e-10) || !(y <= 1.1e+115)) tmp = Float64(t - Float64(Float64(t * x) / 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 <= -2.2e-10) || ~((y <= 1.1e+115))) tmp = t - ((t * x) / y); else tmp = t * (x / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.2e-10], N[Not[LessEqual[y, 1.1e+115]], $MachinePrecision]], N[(t - N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-10} \lor \neg \left(y \leq 1.1 \cdot 10^{+115}\right):\\
\;\;\;\;t - \frac{t \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\end{array}
\end{array}
if y < -2.1999999999999999e-10 or 1.1e115 < y Initial program 99.9%
associate-*l/78.2%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in z around 0 54.7%
associate-*r/54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in x around 0 76.0%
mul-1-neg76.0%
sub-neg76.0%
Simplified76.0%
if -2.1999999999999999e-10 < y < 1.1e115Initial program 95.1%
Taylor expanded in x around inf 83.6%
Final simplification80.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.1e-10) (not (<= y 1.1e+115))) (- t (/ (* t x) y)) (/ t (/ (- z y) x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.1e-10) || !(y <= 1.1e+115)) {
tmp = t - ((t * x) / 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 <= (-3.1d-10)) .or. (.not. (y <= 1.1d+115))) then
tmp = t - ((t * x) / 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 <= -3.1e-10) || !(y <= 1.1e+115)) {
tmp = t - ((t * x) / y);
} else {
tmp = t / ((z - y) / x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.1e-10) or not (y <= 1.1e+115): tmp = t - ((t * x) / y) else: tmp = t / ((z - y) / x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.1e-10) || !(y <= 1.1e+115)) tmp = Float64(t - Float64(Float64(t * x) / 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 <= -3.1e-10) || ~((y <= 1.1e+115))) tmp = t - ((t * x) / y); else tmp = t / ((z - y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.1e-10], N[Not[LessEqual[y, 1.1e+115]], $MachinePrecision]], N[(t - N[(N[(t * x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-10} \lor \neg \left(y \leq 1.1 \cdot 10^{+115}\right):\\
\;\;\;\;t - \frac{t \cdot x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\end{array}
\end{array}
if y < -3.10000000000000015e-10 or 1.1e115 < y Initial program 99.9%
associate-*l/78.2%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in z around 0 54.7%
associate-*r/54.7%
neg-mul-154.7%
Simplified54.7%
Taylor expanded in x around 0 76.0%
mul-1-neg76.0%
sub-neg76.0%
Simplified76.0%
if -3.10000000000000015e-10 < y < 1.1e115Initial program 95.1%
associate-*l/88.7%
associate-/l*95.5%
Simplified95.5%
associate-*r/88.7%
associate-*l/95.1%
*-commutative95.1%
clear-num95.0%
un-div-inv95.4%
Applied egg-rr95.4%
Taylor expanded in x around inf 83.9%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (<= y -2.1e+97) t (if (<= y 1.9e+69) (* (- x y) (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.1e+97) {
tmp = t;
} else if (y <= 1.9e+69) {
tmp = (x - y) * (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 <= (-2.1d+97)) then
tmp = t
else if (y <= 1.9d+69) then
tmp = (x - y) * (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 <= -2.1e+97) {
tmp = t;
} else if (y <= 1.9e+69) {
tmp = (x - y) * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.1e+97: tmp = t elif y <= 1.9e+69: tmp = (x - y) * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.1e+97) tmp = t; elseif (y <= 1.9e+69) tmp = Float64(Float64(x - y) * Float64(t / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.1e+97) tmp = t; elseif (y <= 1.9e+69) tmp = (x - y) * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.1e+97], t, If[LessEqual[y, 1.9e+69], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+97}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+69}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.10000000000000012e97 or 1.90000000000000014e69 < y Initial program 99.9%
associate-*l/74.1%
associate-/l*65.6%
Simplified65.6%
Taylor expanded in y around inf 67.3%
if -2.10000000000000012e97 < y < 1.90000000000000014e69Initial program 95.5%
associate-*l/89.9%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in z around inf 66.8%
*-commutative66.8%
associate-/l*72.1%
Simplified72.1%
Final simplification70.5%
(FPCore (x y z t) :precision binary64 (if (<= y -3.1e+97) t (if (<= y 2e+115) (* t (/ x (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e+97) {
tmp = t;
} else if (y <= 2e+115) {
tmp = t * (x / (z - y));
} 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 <= (-3.1d+97)) then
tmp = t
else if (y <= 2d+115) then
tmp = t * (x / (z - y))
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 <= -3.1e+97) {
tmp = t;
} else if (y <= 2e+115) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e+97: tmp = t elif y <= 2e+115: tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e+97) tmp = t; elseif (y <= 2e+115) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.1e+97) tmp = t; elseif (y <= 2e+115) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e+97], t, If[LessEqual[y, 2e+115], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+97}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+115}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.09999999999999981e97 or 2e115 < y Initial program 99.9%
associate-*l/72.6%
associate-/l*63.2%
Simplified63.2%
Taylor expanded in y around inf 71.4%
if -3.09999999999999981e97 < y < 2e115Initial program 95.6%
Taylor expanded in x around inf 80.2%
Final simplification77.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.18e-148) t (if (<= y 8.2e-173) (* t (/ x y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.18e-148) {
tmp = t;
} else if (y <= 8.2e-173) {
tmp = t * (x / y);
} 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 <= (-1.18d-148)) then
tmp = t
else if (y <= 8.2d-173) then
tmp = t * (x / y)
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 <= -1.18e-148) {
tmp = t;
} else if (y <= 8.2e-173) {
tmp = t * (x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.18e-148: tmp = t elif y <= 8.2e-173: tmp = t * (x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.18e-148) tmp = t; elseif (y <= 8.2e-173) tmp = Float64(t * Float64(x / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.18e-148) tmp = t; elseif (y <= 8.2e-173) tmp = t * (x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.18e-148], t, If[LessEqual[y, 8.2e-173], N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.18 \cdot 10^{-148}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-173}:\\
\;\;\;\;t \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.18e-148 or 8.1999999999999995e-173 < y Initial program 98.7%
associate-*l/84.3%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in y around inf 37.5%
if -1.18e-148 < y < 8.1999999999999995e-173Initial program 92.4%
associate-*l/85.9%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in z around 0 13.8%
associate-*r/13.8%
neg-mul-113.8%
Simplified13.8%
Taylor expanded in x around inf 24.7%
associate-*r/24.7%
mul-1-neg24.7%
Simplified24.7%
add-sqr-sqrt17.6%
sqrt-unprod25.4%
sqr-neg25.4%
sqrt-unprod15.6%
add-sqr-sqrt28.8%
*-commutative28.8%
associate-/l*21.3%
Applied egg-rr21.3%
associate-*r/28.8%
*-commutative28.8%
associate-*r/21.4%
Simplified21.4%
Final simplification32.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.75e-10) t (if (<= y 6e+68) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.75e-10) {
tmp = t;
} else if (y <= 6e+68) {
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 <= (-1.75d-10)) then
tmp = t
else if (y <= 6d+68) 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 <= -1.75e-10) {
tmp = t;
} else if (y <= 6e+68) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.75e-10: tmp = t elif y <= 6e+68: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.75e-10) tmp = t; elseif (y <= 6e+68) 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 <= -1.75e-10) tmp = t; elseif (y <= 6e+68) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.75e-10], t, If[LessEqual[y, 6e+68], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-10}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.7499999999999999e-10 or 6.0000000000000004e68 < y Initial program 99.8%
associate-*l/79.0%
associate-/l*71.3%
Simplified71.3%
Taylor expanded in y around inf 59.0%
if -1.7499999999999999e-10 < y < 6.0000000000000004e68Initial program 94.9%
associate-*l/88.7%
associate-/l*95.9%
Simplified95.9%
Taylor expanded in y around 0 61.2%
*-commutative61.2%
associate-/l*67.2%
Simplified67.2%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.95e-10) t (if (<= y 2.45e+70) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-10) {
tmp = t;
} else if (y <= 2.45e+70) {
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 <= (-1.95d-10)) then
tmp = t
else if (y <= 2.45d+70) 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 <= -1.95e-10) {
tmp = t;
} else if (y <= 2.45e+70) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e-10: tmp = t elif y <= 2.45e+70: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e-10) tmp = t; elseif (y <= 2.45e+70) 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 <= -1.95e-10) tmp = t; elseif (y <= 2.45e+70) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e-10], t, If[LessEqual[y, 2.45e+70], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-10}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.95e-10 or 2.45000000000000014e70 < y Initial program 99.8%
associate-*l/79.0%
associate-/l*71.3%
Simplified71.3%
Taylor expanded in y around inf 59.0%
if -1.95e-10 < y < 2.45000000000000014e70Initial program 94.9%
Taylor expanded in y around 0 67.9%
Final simplification64.3%
(FPCore (x y z t) :precision binary64 (* t (/ (- x y) (- z y))))
double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - 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 * ((x - y) / (z - y))
end function
public static double code(double x, double y, double z, double t) {
return t * ((x - y) / (z - y));
}
def code(x, y, z, t): return t * ((x - y) / (z - y))
function code(x, y, z, t) return Float64(t * Float64(Float64(x - y) / Float64(z - y))) end
function tmp = code(x, y, z, t) tmp = t * ((x - y) / (z - y)); end
code[x_, y_, z_, t_] := N[(t * N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \frac{x - y}{z - y}
\end{array}
Initial program 96.9%
Final simplification96.9%
(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 96.9%
associate-*l/84.7%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in y around inf 27.7%
Final simplification27.7%
(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 2024071
(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))