
(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 18 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 (/ (- y z) (- y x))))
double code(double x, double y, double z, double t) {
return t / ((y - z) / (y - 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 = t / ((y - z) / (y - x))
end function
public static double code(double x, double y, double z, double t) {
return t / ((y - z) / (y - x));
}
def code(x, y, z, t): return t / ((y - z) / (y - x))
function code(x, y, z, t) return Float64(t / Float64(Float64(y - z) / Float64(y - x))) end
function tmp = code(x, y, z, t) tmp = t / ((y - z) / (y - x)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(y - z), $MachinePrecision] / N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{y - z}{y - x}}
\end{array}
Initial program 96.9%
*-commutative96.9%
associate-*r/84.1%
associate-/l*96.9%
sub-neg96.9%
+-commutative96.9%
neg-sub096.9%
associate-+l-96.9%
sub0-neg96.9%
neg-mul-196.9%
associate-/r*96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ t (- y z)))))
(if (<= y -1.9e+131)
t
(if (<= y -2.9e-92)
t_1
(if (<= y 2.75e-120) (/ t (/ z x)) (if (<= y 9.8e+138) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t / (y - z));
double tmp;
if (y <= -1.9e+131) {
tmp = t;
} else if (y <= -2.9e-92) {
tmp = t_1;
} else if (y <= 2.75e-120) {
tmp = t / (z / x);
} else if (y <= 9.8e+138) {
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 = y * (t / (y - z))
if (y <= (-1.9d+131)) then
tmp = t
else if (y <= (-2.9d-92)) then
tmp = t_1
else if (y <= 2.75d-120) then
tmp = t / (z / x)
else if (y <= 9.8d+138) 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 = y * (t / (y - z));
double tmp;
if (y <= -1.9e+131) {
tmp = t;
} else if (y <= -2.9e-92) {
tmp = t_1;
} else if (y <= 2.75e-120) {
tmp = t / (z / x);
} else if (y <= 9.8e+138) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t / (y - z)) tmp = 0 if y <= -1.9e+131: tmp = t elif y <= -2.9e-92: tmp = t_1 elif y <= 2.75e-120: tmp = t / (z / x) elif y <= 9.8e+138: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t / Float64(y - z))) tmp = 0.0 if (y <= -1.9e+131) tmp = t; elseif (y <= -2.9e-92) tmp = t_1; elseif (y <= 2.75e-120) tmp = Float64(t / Float64(z / x)); elseif (y <= 9.8e+138) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t / (y - z)); tmp = 0.0; if (y <= -1.9e+131) tmp = t; elseif (y <= -2.9e-92) tmp = t_1; elseif (y <= 2.75e-120) tmp = t / (z / x); elseif (y <= 9.8e+138) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+131], t, If[LessEqual[y, -2.9e-92], t$95$1, If[LessEqual[y, 2.75e-120], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+138], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{y - z}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+131}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-120}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.9000000000000002e131 or 9.79999999999999966e138 < y Initial program 99.9%
Taylor expanded in y around inf 80.5%
if -1.9000000000000002e131 < y < -2.89999999999999985e-92 or 2.7500000000000001e-120 < y < 9.79999999999999966e138Initial program 97.0%
*-commutative97.0%
associate-*r/92.6%
associate-/l*97.1%
sub-neg97.1%
+-commutative97.1%
neg-sub097.1%
associate-+l-97.1%
sub0-neg97.1%
neg-mul-197.1%
associate-/r*97.1%
Simplified97.1%
Taylor expanded in x around 0 58.0%
associate-*l/57.9%
*-commutative57.9%
Simplified57.9%
if -2.89999999999999985e-92 < y < 2.7500000000000001e-120Initial program 94.1%
Taylor expanded in y around 0 78.2%
associate-/l*80.4%
Simplified80.4%
Final simplification71.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ t (- z y)))))
(if (<= x -6.1e+66)
t_1
(if (<= x 2.8e-59)
(* y (/ t (- y z)))
(if (<= x 1.3e-25) (* t (/ (- x y) z)) (if (<= x 5e+20) t t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t / (z - y));
double tmp;
if (x <= -6.1e+66) {
tmp = t_1;
} else if (x <= 2.8e-59) {
tmp = y * (t / (y - z));
} else if (x <= 1.3e-25) {
tmp = t * ((x - y) / z);
} else if (x <= 5e+20) {
tmp = t;
} 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 = x * (t / (z - y))
if (x <= (-6.1d+66)) then
tmp = t_1
else if (x <= 2.8d-59) then
tmp = y * (t / (y - z))
else if (x <= 1.3d-25) then
tmp = t * ((x - y) / z)
else if (x <= 5d+20) then
tmp = t
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 = x * (t / (z - y));
double tmp;
if (x <= -6.1e+66) {
tmp = t_1;
} else if (x <= 2.8e-59) {
tmp = y * (t / (y - z));
} else if (x <= 1.3e-25) {
tmp = t * ((x - y) / z);
} else if (x <= 5e+20) {
tmp = t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t / (z - y)) tmp = 0 if x <= -6.1e+66: tmp = t_1 elif x <= 2.8e-59: tmp = y * (t / (y - z)) elif x <= 1.3e-25: tmp = t * ((x - y) / z) elif x <= 5e+20: tmp = t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t / Float64(z - y))) tmp = 0.0 if (x <= -6.1e+66) tmp = t_1; elseif (x <= 2.8e-59) tmp = Float64(y * Float64(t / Float64(y - z))); elseif (x <= 1.3e-25) tmp = Float64(t * Float64(Float64(x - y) / z)); elseif (x <= 5e+20) tmp = t; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t / (z - y)); tmp = 0.0; if (x <= -6.1e+66) tmp = t_1; elseif (x <= 2.8e-59) tmp = y * (t / (y - z)); elseif (x <= 1.3e-25) tmp = t * ((x - y) / z); elseif (x <= 5e+20) tmp = t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.1e+66], t$95$1, If[LessEqual[x, 2.8e-59], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e-25], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e+20], t, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{t}{z - y}\\
\mathbf{if}\;x \leq -6.1 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-59}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-25}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+20}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -6.10000000000000021e66 or 5e20 < x Initial program 96.4%
Taylor expanded in x around inf 77.2%
associate-/l*79.7%
Simplified79.7%
associate-/r/70.9%
Applied egg-rr70.9%
if -6.10000000000000021e66 < x < 2.79999999999999981e-59Initial program 96.9%
*-commutative96.9%
associate-*r/80.0%
associate-/l*97.0%
sub-neg97.0%
+-commutative97.0%
neg-sub097.0%
associate-+l-97.0%
sub0-neg97.0%
neg-mul-197.0%
associate-/r*97.0%
Simplified97.0%
Taylor expanded in x around 0 71.8%
associate-*l/73.0%
*-commutative73.0%
Simplified73.0%
if 2.79999999999999981e-59 < x < 1.3e-25Initial program 99.8%
Taylor expanded in z around inf 88.8%
if 1.3e-25 < x < 5e20Initial program 100.0%
Taylor expanded in y around inf 80.9%
Final simplification73.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ t (- y z)))) (t_2 (* t (/ (- y x) y))))
(if (<= y -1.95e+28)
t_2
(if (<= y -2.8e-86)
t_1
(if (<= y 1.7e+43) (/ t (/ (- z y) x)) (if (<= y 3.9e+108) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (t / (y - z));
double t_2 = t * ((y - x) / y);
double tmp;
if (y <= -1.95e+28) {
tmp = t_2;
} else if (y <= -2.8e-86) {
tmp = t_1;
} else if (y <= 1.7e+43) {
tmp = t / ((z - y) / x);
} else if (y <= 3.9e+108) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = y * (t / (y - z))
t_2 = t * ((y - x) / y)
if (y <= (-1.95d+28)) then
tmp = t_2
else if (y <= (-2.8d-86)) then
tmp = t_1
else if (y <= 1.7d+43) then
tmp = t / ((z - y) / x)
else if (y <= 3.9d+108) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (t / (y - z));
double t_2 = t * ((y - x) / y);
double tmp;
if (y <= -1.95e+28) {
tmp = t_2;
} else if (y <= -2.8e-86) {
tmp = t_1;
} else if (y <= 1.7e+43) {
tmp = t / ((z - y) / x);
} else if (y <= 3.9e+108) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (t / (y - z)) t_2 = t * ((y - x) / y) tmp = 0 if y <= -1.95e+28: tmp = t_2 elif y <= -2.8e-86: tmp = t_1 elif y <= 1.7e+43: tmp = t / ((z - y) / x) elif y <= 3.9e+108: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(t / Float64(y - z))) t_2 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -1.95e+28) tmp = t_2; elseif (y <= -2.8e-86) tmp = t_1; elseif (y <= 1.7e+43) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif (y <= 3.9e+108) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (t / (y - z)); t_2 = t * ((y - x) / y); tmp = 0.0; if (y <= -1.95e+28) tmp = t_2; elseif (y <= -2.8e-86) tmp = t_1; elseif (y <= 1.7e+43) tmp = t / ((z - y) / x); elseif (y <= 3.9e+108) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.95e+28], t$95$2, If[LessEqual[y, -2.8e-86], t$95$1, If[LessEqual[y, 1.7e+43], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+108], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{y - z}\\
t_2 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -1.95 \cdot 10^{+28}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+43}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.9499999999999999e28 or 3.89999999999999985e108 < y Initial program 99.9%
Taylor expanded in z around 0 84.8%
associate-*r/84.8%
neg-mul-184.8%
neg-sub084.8%
associate--r-84.8%
neg-sub084.8%
+-commutative84.8%
sub-neg84.8%
Simplified84.8%
if -1.9499999999999999e28 < y < -2.80000000000000009e-86 or 1.70000000000000006e43 < y < 3.89999999999999985e108Initial program 95.7%
*-commutative95.7%
associate-*r/91.7%
associate-/l*95.6%
sub-neg95.6%
+-commutative95.6%
neg-sub095.6%
associate-+l-95.6%
sub0-neg95.6%
neg-mul-195.6%
associate-/r*95.6%
Simplified95.6%
Taylor expanded in x around 0 68.6%
associate-*l/70.6%
*-commutative70.6%
Simplified70.6%
if -2.80000000000000009e-86 < y < 1.70000000000000006e43Initial program 94.8%
Taylor expanded in x around inf 78.1%
associate-/l*80.5%
Simplified80.5%
Final simplification80.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))))
(if (<= y -1e+25)
t_1
(if (<= y -2.7e-86)
(/ y (/ (- y z) t))
(if (<= y 1.9e+43)
(/ t (/ (- z y) x))
(if (<= y 7.6e+110) (* y (/ t (- y z))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -1e+25) {
tmp = t_1;
} else if (y <= -2.7e-86) {
tmp = y / ((y - z) / t);
} else if (y <= 1.9e+43) {
tmp = t / ((z - y) / x);
} else if (y <= 7.6e+110) {
tmp = y * (t / (y - z));
} 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 - x) / y)
if (y <= (-1d+25)) then
tmp = t_1
else if (y <= (-2.7d-86)) then
tmp = y / ((y - z) / t)
else if (y <= 1.9d+43) then
tmp = t / ((z - y) / x)
else if (y <= 7.6d+110) then
tmp = y * (t / (y - z))
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 - x) / y);
double tmp;
if (y <= -1e+25) {
tmp = t_1;
} else if (y <= -2.7e-86) {
tmp = y / ((y - z) / t);
} else if (y <= 1.9e+43) {
tmp = t / ((z - y) / x);
} else if (y <= 7.6e+110) {
tmp = y * (t / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) tmp = 0 if y <= -1e+25: tmp = t_1 elif y <= -2.7e-86: tmp = y / ((y - z) / t) elif y <= 1.9e+43: tmp = t / ((z - y) / x) elif y <= 7.6e+110: tmp = y * (t / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -1e+25) tmp = t_1; elseif (y <= -2.7e-86) tmp = Float64(y / Float64(Float64(y - z) / t)); elseif (y <= 1.9e+43) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif (y <= 7.6e+110) tmp = Float64(y * Float64(t / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); tmp = 0.0; if (y <= -1e+25) tmp = t_1; elseif (y <= -2.7e-86) tmp = y / ((y - z) / t); elseif (y <= 1.9e+43) tmp = t / ((z - y) / x); elseif (y <= 7.6e+110) tmp = y * (t / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+25], t$95$1, If[LessEqual[y, -2.7e-86], N[(y / N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+43], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+110], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-86}:\\
\;\;\;\;\frac{y}{\frac{y - z}{t}}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+43}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+110}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.00000000000000009e25 or 7.59999999999999978e110 < y Initial program 99.9%
Taylor expanded in z around 0 84.8%
associate-*r/84.8%
neg-mul-184.8%
neg-sub084.8%
associate--r-84.8%
neg-sub084.8%
+-commutative84.8%
sub-neg84.8%
Simplified84.8%
if -1.00000000000000009e25 < y < -2.69999999999999992e-86Initial program 90.9%
*-commutative90.9%
associate-*r/95.5%
associate-/l*90.9%
sub-neg90.9%
+-commutative90.9%
neg-sub090.9%
associate-+l-90.9%
sub0-neg90.9%
neg-mul-190.9%
associate-/r*90.9%
Simplified90.9%
Taylor expanded in x around 0 68.7%
associate-*l/68.6%
*-commutative68.6%
Simplified68.6%
clear-num68.6%
un-div-inv68.7%
Applied egg-rr68.7%
if -2.69999999999999992e-86 < y < 1.90000000000000004e43Initial program 94.8%
Taylor expanded in x around inf 78.1%
associate-/l*80.5%
Simplified80.5%
if 1.90000000000000004e43 < y < 7.59999999999999978e110Initial program 99.9%
*-commutative99.9%
associate-*r/88.4%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 68.4%
associate-*l/72.2%
*-commutative72.2%
Simplified72.2%
Final simplification80.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))))
(if (<= y -4.6e+23)
t_1
(if (<= y -2.8e-86)
(/ (* t y) (- y z))
(if (<= y 1.5e+47)
(/ t (/ (- z y) x))
(if (<= y 2.25e+109) (* y (/ t (- y z))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -4.6e+23) {
tmp = t_1;
} else if (y <= -2.8e-86) {
tmp = (t * y) / (y - z);
} else if (y <= 1.5e+47) {
tmp = t / ((z - y) / x);
} else if (y <= 2.25e+109) {
tmp = y * (t / (y - z));
} 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 - x) / y)
if (y <= (-4.6d+23)) then
tmp = t_1
else if (y <= (-2.8d-86)) then
tmp = (t * y) / (y - z)
else if (y <= 1.5d+47) then
tmp = t / ((z - y) / x)
else if (y <= 2.25d+109) then
tmp = y * (t / (y - z))
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 - x) / y);
double tmp;
if (y <= -4.6e+23) {
tmp = t_1;
} else if (y <= -2.8e-86) {
tmp = (t * y) / (y - z);
} else if (y <= 1.5e+47) {
tmp = t / ((z - y) / x);
} else if (y <= 2.25e+109) {
tmp = y * (t / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) tmp = 0 if y <= -4.6e+23: tmp = t_1 elif y <= -2.8e-86: tmp = (t * y) / (y - z) elif y <= 1.5e+47: tmp = t / ((z - y) / x) elif y <= 2.25e+109: tmp = y * (t / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -4.6e+23) tmp = t_1; elseif (y <= -2.8e-86) tmp = Float64(Float64(t * y) / Float64(y - z)); elseif (y <= 1.5e+47) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif (y <= 2.25e+109) tmp = Float64(y * Float64(t / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); tmp = 0.0; if (y <= -4.6e+23) tmp = t_1; elseif (y <= -2.8e-86) tmp = (t * y) / (y - z); elseif (y <= 1.5e+47) tmp = t / ((z - y) / x); elseif (y <= 2.25e+109) tmp = y * (t / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+23], t$95$1, If[LessEqual[y, -2.8e-86], N[(N[(t * y), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+47], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+109], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{t \cdot y}{y - z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+47}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+109}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.6000000000000001e23 or 2.2499999999999998e109 < y Initial program 99.9%
Taylor expanded in z around 0 84.1%
associate-*r/84.1%
neg-mul-184.1%
neg-sub084.1%
associate--r-84.1%
neg-sub084.1%
+-commutative84.1%
sub-neg84.1%
Simplified84.1%
if -4.6000000000000001e23 < y < -2.80000000000000009e-86Initial program 90.0%
*-commutative90.0%
associate-*r/95.1%
associate-/l*90.0%
sub-neg90.0%
+-commutative90.0%
neg-sub090.0%
associate-+l-90.0%
sub0-neg90.0%
neg-mul-190.0%
associate-/r*90.0%
Simplified90.0%
Taylor expanded in x around 0 70.5%
if -2.80000000000000009e-86 < y < 1.5000000000000001e47Initial program 94.8%
Taylor expanded in x around inf 78.1%
associate-/l*80.5%
Simplified80.5%
if 1.5000000000000001e47 < y < 2.2499999999999998e109Initial program 99.9%
*-commutative99.9%
associate-*r/88.4%
associate-/l*99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in x around 0 68.4%
associate-*l/72.2%
*-commutative72.2%
Simplified72.2%
Final simplification80.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ (- y x) y))))
(if (<= y -2.1e+18)
t_1
(if (<= y -2.8e-86)
(/ (* t y) (- y z))
(if (<= y 1.52e-167)
(/ t (/ (- z y) x))
(if (<= y 8.5e-40) (/ (* t (- x y)) z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = t * ((y - x) / y);
double tmp;
if (y <= -2.1e+18) {
tmp = t_1;
} else if (y <= -2.8e-86) {
tmp = (t * y) / (y - z);
} else if (y <= 1.52e-167) {
tmp = t / ((z - y) / x);
} else if (y <= 8.5e-40) {
tmp = (t * (x - y)) / z;
} 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 - x) / y)
if (y <= (-2.1d+18)) then
tmp = t_1
else if (y <= (-2.8d-86)) then
tmp = (t * y) / (y - z)
else if (y <= 1.52d-167) then
tmp = t / ((z - y) / x)
else if (y <= 8.5d-40) then
tmp = (t * (x - y)) / z
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 - x) / y);
double tmp;
if (y <= -2.1e+18) {
tmp = t_1;
} else if (y <= -2.8e-86) {
tmp = (t * y) / (y - z);
} else if (y <= 1.52e-167) {
tmp = t / ((z - y) / x);
} else if (y <= 8.5e-40) {
tmp = (t * (x - y)) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * ((y - x) / y) tmp = 0 if y <= -2.1e+18: tmp = t_1 elif y <= -2.8e-86: tmp = (t * y) / (y - z) elif y <= 1.52e-167: tmp = t / ((z - y) / x) elif y <= 8.5e-40: tmp = (t * (x - y)) / z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(Float64(y - x) / y)) tmp = 0.0 if (y <= -2.1e+18) tmp = t_1; elseif (y <= -2.8e-86) tmp = Float64(Float64(t * y) / Float64(y - z)); elseif (y <= 1.52e-167) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif (y <= 8.5e-40) tmp = Float64(Float64(t * Float64(x - y)) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * ((y - x) / y); tmp = 0.0; if (y <= -2.1e+18) tmp = t_1; elseif (y <= -2.8e-86) tmp = (t * y) / (y - z); elseif (y <= 1.52e-167) tmp = t / ((z - y) / x); elseif (y <= 8.5e-40) tmp = (t * (x - y)) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+18], t$95$1, If[LessEqual[y, -2.8e-86], N[(N[(t * y), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.52e-167], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-40], N[(N[(t * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - x}{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{t \cdot y}{y - z}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-167}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-40}:\\
\;\;\;\;\frac{t \cdot \left(x - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.1e18 or 8.4999999999999998e-40 < y Initial program 99.9%
Taylor expanded in z around 0 79.3%
associate-*r/79.3%
neg-mul-179.3%
neg-sub079.3%
associate--r-79.3%
neg-sub079.3%
+-commutative79.3%
sub-neg79.3%
Simplified79.3%
if -2.1e18 < y < -2.80000000000000009e-86Initial program 90.0%
*-commutative90.0%
associate-*r/95.1%
associate-/l*90.0%
sub-neg90.0%
+-commutative90.0%
neg-sub090.0%
associate-+l-90.0%
sub0-neg90.0%
neg-mul-190.0%
associate-/r*90.0%
Simplified90.0%
Taylor expanded in x around 0 70.5%
if -2.80000000000000009e-86 < y < 1.52e-167Initial program 93.5%
Taylor expanded in x around inf 83.6%
associate-/l*87.3%
Simplified87.3%
if 1.52e-167 < y < 8.4999999999999998e-40Initial program 95.1%
Taylor expanded in z around inf 77.2%
Final simplification80.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ (- t) z))))
(if (<= y -3e-54)
t
(if (<= y -1.3e-86)
t_1
(if (<= y 2.3e-124) (/ t (/ z x)) (if (<= y 1.15e+52) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-t / z);
double tmp;
if (y <= -3e-54) {
tmp = t;
} else if (y <= -1.3e-86) {
tmp = t_1;
} else if (y <= 2.3e-124) {
tmp = t / (z / x);
} else if (y <= 1.15e+52) {
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 = y * (-t / z)
if (y <= (-3d-54)) then
tmp = t
else if (y <= (-1.3d-86)) then
tmp = t_1
else if (y <= 2.3d-124) then
tmp = t / (z / x)
else if (y <= 1.15d+52) 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 = y * (-t / z);
double tmp;
if (y <= -3e-54) {
tmp = t;
} else if (y <= -1.3e-86) {
tmp = t_1;
} else if (y <= 2.3e-124) {
tmp = t / (z / x);
} else if (y <= 1.15e+52) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-t / z) tmp = 0 if y <= -3e-54: tmp = t elif y <= -1.3e-86: tmp = t_1 elif y <= 2.3e-124: tmp = t / (z / x) elif y <= 1.15e+52: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(Float64(-t) / z)) tmp = 0.0 if (y <= -3e-54) tmp = t; elseif (y <= -1.3e-86) tmp = t_1; elseif (y <= 2.3e-124) tmp = Float64(t / Float64(z / x)); elseif (y <= 1.15e+52) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-t / z); tmp = 0.0; if (y <= -3e-54) tmp = t; elseif (y <= -1.3e-86) tmp = t_1; elseif (y <= 2.3e-124) tmp = t / (z / x); elseif (y <= 1.15e+52) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[((-t) / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e-54], t, If[LessEqual[y, -1.3e-86], t$95$1, If[LessEqual[y, 2.3e-124], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+52], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-t}{z}\\
\mathbf{if}\;y \leq -3 \cdot 10^{-54}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-124}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.00000000000000009e-54 or 1.15e52 < y Initial program 99.2%
Taylor expanded in y around inf 63.2%
if -3.00000000000000009e-54 < y < -1.3000000000000001e-86 or 2.30000000000000012e-124 < y < 1.15e52Initial program 94.9%
*-commutative94.9%
associate-*r/99.8%
associate-/l*94.9%
sub-neg94.9%
+-commutative94.9%
neg-sub094.9%
associate-+l-94.9%
sub0-neg94.9%
neg-mul-194.9%
associate-/r*94.9%
Simplified94.9%
Taylor expanded in x around 0 63.1%
associate-*l/60.6%
*-commutative60.6%
Simplified60.6%
Taylor expanded in y around 0 58.1%
associate-*r/58.1%
neg-mul-158.1%
Simplified58.1%
if -1.3000000000000001e-86 < y < 2.30000000000000012e-124Initial program 94.2%
Taylor expanded in y around 0 76.4%
associate-/l*78.5%
Simplified78.5%
Final simplification67.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e-51)
t
(if (<= y -2.8e-86)
(* y (/ (- t) z))
(if (<= y 4.3e-56)
(/ t (/ z x))
(if (<= y 3.7e+43) (* t (- (/ x y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e-51) {
tmp = t;
} else if (y <= -2.8e-86) {
tmp = y * (-t / z);
} else if (y <= 4.3e-56) {
tmp = t / (z / x);
} else if (y <= 3.7e+43) {
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 <= (-1d-51)) then
tmp = t
else if (y <= (-2.8d-86)) then
tmp = y * (-t / z)
else if (y <= 4.3d-56) then
tmp = t / (z / x)
else if (y <= 3.7d+43) 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 <= -1e-51) {
tmp = t;
} else if (y <= -2.8e-86) {
tmp = y * (-t / z);
} else if (y <= 4.3e-56) {
tmp = t / (z / x);
} else if (y <= 3.7e+43) {
tmp = t * -(x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e-51: tmp = t elif y <= -2.8e-86: tmp = y * (-t / z) elif y <= 4.3e-56: tmp = t / (z / x) elif y <= 3.7e+43: tmp = t * -(x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e-51) tmp = t; elseif (y <= -2.8e-86) tmp = Float64(y * Float64(Float64(-t) / z)); elseif (y <= 4.3e-56) tmp = Float64(t / Float64(z / x)); elseif (y <= 3.7e+43) tmp = Float64(t * Float64(-Float64(x / y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e-51) tmp = t; elseif (y <= -2.8e-86) tmp = y * (-t / z); elseif (y <= 4.3e-56) tmp = t / (z / x); elseif (y <= 3.7e+43) tmp = t * -(x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e-51], t, If[LessEqual[y, -2.8e-86], N[(y * N[((-t) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e-56], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+43], N[(t * (-N[(x / y), $MachinePrecision])), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-51}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-86}:\\
\;\;\;\;y \cdot \frac{-t}{z}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-56}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \left(-\frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1e-51 or 3.7000000000000001e43 < y Initial program 99.2%
Taylor expanded in y around inf 62.4%
if -1e-51 < y < -2.80000000000000009e-86Initial program 83.8%
*-commutative83.8%
associate-*r/100.0%
associate-/l*83.8%
sub-neg83.8%
+-commutative83.8%
neg-sub083.8%
associate-+l-83.8%
sub0-neg83.8%
neg-mul-183.8%
associate-/r*83.8%
Simplified83.8%
Taylor expanded in x around 0 100.0%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 96.4%
associate-*r/96.4%
neg-mul-196.4%
Simplified96.4%
if -2.80000000000000009e-86 < y < 4.3000000000000001e-56Initial program 94.7%
Taylor expanded in y around 0 74.3%
associate-/l*76.2%
Simplified76.2%
if 4.3000000000000001e-56 < y < 3.7000000000000001e43Initial program 95.1%
Taylor expanded in x around inf 72.0%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in z around 0 61.6%
metadata-eval61.6%
times-frac61.6%
associate-*r*61.6%
neg-mul-161.6%
times-frac61.7%
distribute-neg-frac61.7%
/-rgt-identity61.7%
Simplified61.7%
Final simplification68.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -5e-52)
t
(if (<= y -9.5e-91)
(/ (* t (- y)) z)
(if (<= y 1.6e-60) (/ t (/ z x)) (if (<= y 4e+46) (* t (- (/ x y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e-52) {
tmp = t;
} else if (y <= -9.5e-91) {
tmp = (t * -y) / z;
} else if (y <= 1.6e-60) {
tmp = t / (z / x);
} else if (y <= 4e+46) {
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 <= (-5d-52)) then
tmp = t
else if (y <= (-9.5d-91)) then
tmp = (t * -y) / z
else if (y <= 1.6d-60) then
tmp = t / (z / x)
else if (y <= 4d+46) 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 <= -5e-52) {
tmp = t;
} else if (y <= -9.5e-91) {
tmp = (t * -y) / z;
} else if (y <= 1.6e-60) {
tmp = t / (z / x);
} else if (y <= 4e+46) {
tmp = t * -(x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5e-52: tmp = t elif y <= -9.5e-91: tmp = (t * -y) / z elif y <= 1.6e-60: tmp = t / (z / x) elif y <= 4e+46: tmp = t * -(x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5e-52) tmp = t; elseif (y <= -9.5e-91) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (y <= 1.6e-60) tmp = Float64(t / Float64(z / x)); elseif (y <= 4e+46) tmp = Float64(t * Float64(-Float64(x / y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5e-52) tmp = t; elseif (y <= -9.5e-91) tmp = (t * -y) / z; elseif (y <= 1.6e-60) tmp = t / (z / x); elseif (y <= 4e+46) tmp = t * -(x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5e-52], t, If[LessEqual[y, -9.5e-91], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.6e-60], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+46], N[(t * (-N[(x / y), $MachinePrecision])), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-52}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-60}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+46}:\\
\;\;\;\;t \cdot \left(-\frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5e-52 or 4e46 < y Initial program 99.2%
Taylor expanded in y around inf 62.4%
if -5e-52 < y < -9.5e-91Initial program 87.6%
*-commutative87.6%
associate-*r/99.8%
associate-/l*87.6%
sub-neg87.6%
+-commutative87.6%
neg-sub087.6%
associate-+l-87.6%
sub0-neg87.6%
neg-mul-187.6%
associate-/r*87.6%
Simplified87.6%
Taylor expanded in x around 0 76.1%
associate-*l/75.9%
*-commutative75.9%
Simplified75.9%
Taylor expanded in y around 0 72.6%
associate-*r/72.6%
*-commutative72.6%
neg-mul-172.6%
distribute-rgt-neg-in72.6%
Simplified72.6%
if -9.5e-91 < y < 1.6000000000000001e-60Initial program 94.6%
Taylor expanded in y around 0 76.0%
associate-/l*77.9%
Simplified77.9%
if 1.6000000000000001e-60 < y < 4e46Initial program 95.1%
Taylor expanded in x around inf 72.0%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in z around 0 61.6%
metadata-eval61.6%
times-frac61.6%
associate-*r*61.6%
neg-mul-161.6%
times-frac61.7%
distribute-neg-frac61.7%
/-rgt-identity61.7%
Simplified61.7%
Final simplification68.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ (- z y) x))))
(if (<= x -1.16e+67)
t_1
(if (<= x 8.5e-27)
(/ (- t) (+ (/ z y) -1.0))
(if (<= x 1.85e+72) (* t (/ (- y x) y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = t / ((z - y) / x);
double tmp;
if (x <= -1.16e+67) {
tmp = t_1;
} else if (x <= 8.5e-27) {
tmp = -t / ((z / y) + -1.0);
} else if (x <= 1.85e+72) {
tmp = t * ((y - x) / 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 / ((z - y) / x)
if (x <= (-1.16d+67)) then
tmp = t_1
else if (x <= 8.5d-27) then
tmp = -t / ((z / y) + (-1.0d0))
else if (x <= 1.85d+72) then
tmp = t * ((y - x) / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / ((z - y) / x);
double tmp;
if (x <= -1.16e+67) {
tmp = t_1;
} else if (x <= 8.5e-27) {
tmp = -t / ((z / y) + -1.0);
} else if (x <= 1.85e+72) {
tmp = t * ((y - x) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = t / ((z - y) / x) tmp = 0 if x <= -1.16e+67: tmp = t_1 elif x <= 8.5e-27: tmp = -t / ((z / y) + -1.0) elif x <= 1.85e+72: tmp = t * ((y - x) / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(Float64(z - y) / x)) tmp = 0.0 if (x <= -1.16e+67) tmp = t_1; elseif (x <= 8.5e-27) tmp = Float64(Float64(-t) / Float64(Float64(z / y) + -1.0)); elseif (x <= 1.85e+72) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / ((z - y) / x); tmp = 0.0; if (x <= -1.16e+67) tmp = t_1; elseif (x <= 8.5e-27) tmp = -t / ((z / y) + -1.0); elseif (x <= 1.85e+72) tmp = t * ((y - x) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.16e+67], t$95$1, If[LessEqual[x, 8.5e-27], N[((-t) / N[(N[(z / y), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.85e+72], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{z - y}{x}}\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{-t}{\frac{z}{y} + -1}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+72}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.15999999999999994e67 or 1.8500000000000001e72 < x Initial program 95.9%
Taylor expanded in x around inf 81.1%
associate-/l*83.9%
Simplified83.9%
if -1.15999999999999994e67 < x < 8.50000000000000033e-27Initial program 97.1%
Taylor expanded in x around 0 71.0%
mul-1-neg71.0%
associate-/l*84.0%
distribute-neg-frac84.0%
div-sub84.0%
*-inverses84.0%
Simplified84.0%
if 8.50000000000000033e-27 < x < 1.8500000000000001e72Initial program 99.9%
Taylor expanded in z around 0 83.0%
associate-*r/83.0%
neg-mul-183.0%
neg-sub083.0%
associate--r-83.0%
neg-sub083.0%
+-commutative83.0%
sub-neg83.0%
Simplified83.0%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.8e+66) (not (<= x 1450000000.0))) (* x (/ t (- z y))) (* y (/ t (- y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.8e+66) || !(x <= 1450000000.0)) {
tmp = x * (t / (z - y));
} else {
tmp = y * (t / (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 ((x <= (-5.8d+66)) .or. (.not. (x <= 1450000000.0d0))) then
tmp = x * (t / (z - y))
else
tmp = y * (t / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.8e+66) || !(x <= 1450000000.0)) {
tmp = x * (t / (z - y));
} else {
tmp = y * (t / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.8e+66) or not (x <= 1450000000.0): tmp = x * (t / (z - y)) else: tmp = y * (t / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5.8e+66) || !(x <= 1450000000.0)) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = Float64(y * Float64(t / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5.8e+66) || ~((x <= 1450000000.0))) tmp = x * (t / (z - y)); else tmp = y * (t / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.8e+66], N[Not[LessEqual[x, 1450000000.0]], $MachinePrecision]], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+66} \lor \neg \left(x \leq 1450000000\right):\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{y - z}\\
\end{array}
\end{array}
if x < -5.79999999999999972e66 or 1.45e9 < x Initial program 96.5%
Taylor expanded in x around inf 76.1%
associate-/l*78.5%
Simplified78.5%
associate-/r/69.9%
Applied egg-rr69.9%
if -5.79999999999999972e66 < x < 1.45e9Initial program 97.3%
*-commutative97.3%
associate-*r/80.8%
associate-/l*97.3%
sub-neg97.3%
+-commutative97.3%
neg-sub097.3%
associate-+l-97.3%
sub0-neg97.3%
neg-mul-197.3%
associate-/r*97.3%
Simplified97.3%
Taylor expanded in x around 0 70.0%
associate-*l/71.1%
*-commutative71.1%
Simplified71.1%
Final simplification70.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.2e-35) (not (<= y 8.5e-40))) (* t (/ (- y x) y)) (* t (/ (- x y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e-35) || !(y <= 8.5e-40)) {
tmp = t * ((y - x) / y);
} else {
tmp = t * ((x - 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 <= (-6.2d-35)) .or. (.not. (y <= 8.5d-40))) then
tmp = t * ((y - x) / y)
else
tmp = t * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e-35) || !(y <= 8.5e-40)) {
tmp = t * ((y - x) / y);
} else {
tmp = t * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e-35) or not (y <= 8.5e-40): tmp = t * ((y - x) / y) else: tmp = t * ((x - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e-35) || !(y <= 8.5e-40)) tmp = Float64(t * Float64(Float64(y - x) / y)); else tmp = Float64(t * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e-35) || ~((y <= 8.5e-40))) tmp = t * ((y - x) / y); else tmp = t * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e-35], N[Not[LessEqual[y, 8.5e-40]], $MachinePrecision]], N[(t * N[(N[(y - x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-35} \lor \neg \left(y \leq 8.5 \cdot 10^{-40}\right):\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if y < -6.20000000000000024e-35 or 8.4999999999999998e-40 < y Initial program 99.9%
Taylor expanded in z around 0 78.0%
associate-*r/78.0%
neg-mul-178.0%
neg-sub078.0%
associate--r-78.0%
neg-sub078.0%
+-commutative78.0%
sub-neg78.0%
Simplified78.0%
if -6.20000000000000024e-35 < y < 8.4999999999999998e-40Initial program 92.6%
Taylor expanded in z around inf 79.5%
Final simplification78.6%
(FPCore (x y z t) :precision binary64 (if (<= y -7e-40) t (if (<= y 2.8e+45) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-40) {
tmp = t;
} else if (y <= 2.8e+45) {
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 <= (-7d-40)) then
tmp = t
else if (y <= 2.8d+45) 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 <= -7e-40) {
tmp = t;
} else if (y <= 2.8e+45) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e-40: tmp = t elif y <= 2.8e+45: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e-40) tmp = t; elseif (y <= 2.8e+45) 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 <= -7e-40) tmp = t; elseif (y <= 2.8e+45) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e-40], t, If[LessEqual[y, 2.8e+45], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-40}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+45}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.0000000000000003e-40 or 2.7999999999999999e45 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -7.0000000000000003e-40 < y < 2.7999999999999999e45Initial program 93.6%
Taylor expanded in x around inf 73.6%
associate-/l*75.8%
Simplified75.8%
associate-/r/73.7%
Applied egg-rr73.7%
Taylor expanded in z around inf 61.1%
Final simplification62.6%
(FPCore (x y z t) :precision binary64 (if (<= y -6.8e-39) t (if (<= y 2.5e+43) (* t (/ x z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.8e-39) {
tmp = t;
} else if (y <= 2.5e+43) {
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.8d-39)) then
tmp = t
else if (y <= 2.5d+43) 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.8e-39) {
tmp = t;
} else if (y <= 2.5e+43) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.8e-39: tmp = t elif y <= 2.5e+43: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.8e-39) tmp = t; elseif (y <= 2.5e+43) 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.8e-39) tmp = t; elseif (y <= 2.5e+43) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.8e-39], t, If[LessEqual[y, 2.5e+43], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{-39}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -6.7999999999999998e-39 or 2.5000000000000002e43 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -6.7999999999999998e-39 < y < 2.5000000000000002e43Initial program 93.6%
Taylor expanded in y around 0 63.8%
Final simplification63.8%
(FPCore (x y z t) :precision binary64 (if (<= y -1.45e-32) t (if (<= y 1.75e+43) (/ t (/ z x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e-32) {
tmp = t;
} else if (y <= 1.75e+43) {
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 <= (-1.45d-32)) then
tmp = t
else if (y <= 1.75d+43) 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 <= -1.45e-32) {
tmp = t;
} else if (y <= 1.75e+43) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e-32: tmp = t elif y <= 1.75e+43: tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e-32) tmp = t; elseif (y <= 1.75e+43) 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 <= -1.45e-32) tmp = t; elseif (y <= 1.75e+43) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e-32], t, If[LessEqual[y, 1.75e+43], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-32}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+43}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.44999999999999998e-32 or 1.7500000000000001e43 < y Initial program 99.9%
Taylor expanded in y around inf 63.9%
if -1.44999999999999998e-32 < y < 1.7500000000000001e43Initial program 93.6%
Taylor expanded in y around 0 61.6%
associate-/l*63.8%
Simplified63.8%
Final simplification63.9%
(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%
Taylor expanded in y around inf 38.1%
Final simplification38.1%
(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 2023274
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:herbie-target
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))