
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Initial program 97.6%
Final simplification97.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.6e+28)
t
(if (<= y -2.3e-13)
(/ t (/ z x))
(if (<= y -1.7e-47)
(/ (* y (- t)) z)
(if (<= y -2.5e-231)
(/ x (/ z t))
(if (<= y 5.4e-60)
(/ (* x t) z)
(if (<= y 1.15e+123) (* x (/ (- t) y)) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6e+28) {
tmp = t;
} else if (y <= -2.3e-13) {
tmp = t / (z / x);
} else if (y <= -1.7e-47) {
tmp = (y * -t) / z;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 5.4e-60) {
tmp = (x * t) / z;
} else if (y <= 1.15e+123) {
tmp = x * (-t / 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.6d+28)) then
tmp = t
else if (y <= (-2.3d-13)) then
tmp = t / (z / x)
else if (y <= (-1.7d-47)) then
tmp = (y * -t) / z
else if (y <= (-2.5d-231)) then
tmp = x / (z / t)
else if (y <= 5.4d-60) then
tmp = (x * t) / z
else if (y <= 1.15d+123) then
tmp = x * (-t / 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.6e+28) {
tmp = t;
} else if (y <= -2.3e-13) {
tmp = t / (z / x);
} else if (y <= -1.7e-47) {
tmp = (y * -t) / z;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 5.4e-60) {
tmp = (x * t) / z;
} else if (y <= 1.15e+123) {
tmp = x * (-t / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.6e+28: tmp = t elif y <= -2.3e-13: tmp = t / (z / x) elif y <= -1.7e-47: tmp = (y * -t) / z elif y <= -2.5e-231: tmp = x / (z / t) elif y <= 5.4e-60: tmp = (x * t) / z elif y <= 1.15e+123: tmp = x * (-t / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.6e+28) tmp = t; elseif (y <= -2.3e-13) tmp = Float64(t / Float64(z / x)); elseif (y <= -1.7e-47) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (y <= -2.5e-231) tmp = Float64(x / Float64(z / t)); elseif (y <= 5.4e-60) tmp = Float64(Float64(x * t) / z); elseif (y <= 1.15e+123) tmp = Float64(x * Float64(Float64(-t) / y)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.6e+28) tmp = t; elseif (y <= -2.3e-13) tmp = t / (z / x); elseif (y <= -1.7e-47) tmp = (y * -t) / z; elseif (y <= -2.5e-231) tmp = x / (z / t); elseif (y <= 5.4e-60) tmp = (x * t) / z; elseif (y <= 1.15e+123) tmp = x * (-t / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.6e+28], t, If[LessEqual[y, -2.3e-13], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-47], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.5e-231], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e-60], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.15e+123], N[(x * N[((-t) / y), $MachinePrecision]), $MachinePrecision], t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+28}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-13}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-47}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{-60}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+123}:\\
\;\;\;\;x \cdot \frac{-t}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.5999999999999999e28 or 1.14999999999999995e123 < y Initial program 99.8%
associate-*l/70.2%
*-commutative70.2%
associate-*l/73.9%
Simplified73.9%
Taylor expanded in y around inf 62.4%
if -3.5999999999999999e28 < y < -2.29999999999999979e-13Initial program 99.6%
associate-*l/91.2%
*-commutative91.2%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around 0 54.9%
associate-/l*63.5%
Simplified63.5%
if -2.29999999999999979e-13 < y < -1.7000000000000001e-47Initial program 99.6%
associate-*l/99.8%
*-commutative99.8%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in z around inf 49.4%
Taylor expanded in x around 0 36.0%
mul-1-neg36.0%
associate-*l/35.7%
*-commutative35.7%
Simplified35.7%
Taylor expanded in y around 0 36.0%
if -1.7000000000000001e-47 < y < -2.50000000000000012e-231Initial program 90.1%
Taylor expanded in y around 0 57.3%
associate-*l/54.1%
associate-/l*63.2%
Applied egg-rr63.2%
if -2.50000000000000012e-231 < y < 5.40000000000000001e-60Initial program 95.7%
associate-*l/98.2%
*-commutative98.2%
associate-*l/91.6%
Simplified91.6%
Taylor expanded in y around 0 79.4%
if 5.40000000000000001e-60 < y < 1.14999999999999995e123Initial program 99.7%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 49.7%
associate-/l*59.1%
Simplified59.1%
associate-/r/56.6%
Applied egg-rr56.6%
Taylor expanded in z around 0 46.0%
associate-*r/46.0%
neg-mul-146.0%
Simplified46.0%
Final simplification63.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ x z))))
(if (<= y -1.56e+29)
t
(if (<= y -6.5e-28)
t_1
(if (<= y -1.08e-48)
t
(if (<= y -2.5e-231) (* x (/ t z)) (if (<= y 3.5e+70) t_1 t)))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (x / z);
double tmp;
if (y <= -1.56e+29) {
tmp = t;
} else if (y <= -6.5e-28) {
tmp = t_1;
} else if (y <= -1.08e-48) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x * (t / z);
} else if (y <= 3.5e+70) {
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 / z)
if (y <= (-1.56d+29)) then
tmp = t
else if (y <= (-6.5d-28)) then
tmp = t_1
else if (y <= (-1.08d-48)) then
tmp = t
else if (y <= (-2.5d-231)) then
tmp = x * (t / z)
else if (y <= 3.5d+70) 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 / z);
double tmp;
if (y <= -1.56e+29) {
tmp = t;
} else if (y <= -6.5e-28) {
tmp = t_1;
} else if (y <= -1.08e-48) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x * (t / z);
} else if (y <= 3.5e+70) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (x / z) tmp = 0 if y <= -1.56e+29: tmp = t elif y <= -6.5e-28: tmp = t_1 elif y <= -1.08e-48: tmp = t elif y <= -2.5e-231: tmp = x * (t / z) elif y <= 3.5e+70: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(x / z)) tmp = 0.0 if (y <= -1.56e+29) tmp = t; elseif (y <= -6.5e-28) tmp = t_1; elseif (y <= -1.08e-48) tmp = t; elseif (y <= -2.5e-231) tmp = Float64(x * Float64(t / z)); elseif (y <= 3.5e+70) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (x / z); tmp = 0.0; if (y <= -1.56e+29) tmp = t; elseif (y <= -6.5e-28) tmp = t_1; elseif (y <= -1.08e-48) tmp = t; elseif (y <= -2.5e-231) tmp = x * (t / z); elseif (y <= 3.5e+70) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.56e+29], t, If[LessEqual[y, -6.5e-28], t$95$1, If[LessEqual[y, -1.08e-48], t, If[LessEqual[y, -2.5e-231], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+70], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.56 \cdot 10^{+29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.08 \cdot 10^{-48}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.5599999999999999e29 or -6.50000000000000043e-28 < y < -1.08e-48 or 3.50000000000000002e70 < y Initial program 99.8%
associate-*l/72.6%
*-commutative72.6%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in y around inf 59.3%
if -1.5599999999999999e29 < y < -6.50000000000000043e-28 or -2.50000000000000012e-231 < y < 3.50000000000000002e70Initial program 97.4%
Taylor expanded in y around 0 61.6%
if -1.08e-48 < y < -2.50000000000000012e-231Initial program 90.1%
associate-*l/83.6%
*-commutative83.6%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in y around 0 54.1%
associate-/l*57.4%
Simplified57.4%
associate-/r/63.1%
Applied egg-rr63.1%
Final simplification60.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.8e+29)
t
(if (<= y -3.65e-28)
(/ t (/ z x))
(if (<= y -2.1e-47)
t
(if (<= y -2.5e-231)
(* x (/ t z))
(if (<= y 4.2e+70) (* t (/ x z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e+29) {
tmp = t;
} else if (y <= -3.65e-28) {
tmp = t / (z / x);
} else if (y <= -2.1e-47) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x * (t / z);
} else if (y <= 4.2e+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 <= (-5.8d+29)) then
tmp = t
else if (y <= (-3.65d-28)) then
tmp = t / (z / x)
else if (y <= (-2.1d-47)) then
tmp = t
else if (y <= (-2.5d-231)) then
tmp = x * (t / z)
else if (y <= 4.2d+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 <= -5.8e+29) {
tmp = t;
} else if (y <= -3.65e-28) {
tmp = t / (z / x);
} else if (y <= -2.1e-47) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x * (t / z);
} else if (y <= 4.2e+70) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e+29: tmp = t elif y <= -3.65e-28: tmp = t / (z / x) elif y <= -2.1e-47: tmp = t elif y <= -2.5e-231: tmp = x * (t / z) elif y <= 4.2e+70: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e+29) tmp = t; elseif (y <= -3.65e-28) tmp = Float64(t / Float64(z / x)); elseif (y <= -2.1e-47) tmp = t; elseif (y <= -2.5e-231) tmp = Float64(x * Float64(t / z)); elseif (y <= 4.2e+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 <= -5.8e+29) tmp = t; elseif (y <= -3.65e-28) tmp = t / (z / x); elseif (y <= -2.1e-47) tmp = t; elseif (y <= -2.5e-231) tmp = x * (t / z); elseif (y <= 4.2e+70) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e+29], t, If[LessEqual[y, -3.65e-28], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-47], t, If[LessEqual[y, -2.5e-231], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+70], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.65 \cdot 10^{-28}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-47}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -5.7999999999999999e29 or -3.6499999999999998e-28 < y < -2.1000000000000001e-47 or 4.20000000000000015e70 < y Initial program 99.8%
associate-*l/72.6%
*-commutative72.6%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in y around inf 59.3%
if -5.7999999999999999e29 < y < -3.6499999999999998e-28Initial program 99.6%
associate-*l/93.4%
*-commutative93.4%
associate-*l/81.6%
Simplified81.6%
Taylor expanded in y around 0 46.2%
associate-/l*52.4%
Simplified52.4%
if -2.1000000000000001e-47 < y < -2.50000000000000012e-231Initial program 90.1%
associate-*l/83.6%
*-commutative83.6%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in y around 0 54.1%
associate-/l*57.4%
Simplified57.4%
associate-/r/63.1%
Applied egg-rr63.1%
if -2.50000000000000012e-231 < y < 4.20000000000000015e70Initial program 97.0%
Taylor expanded in y around 0 63.0%
Final simplification60.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.95e+27)
t
(if (<= y -4.8e-25)
(/ t (/ z x))
(if (<= y -9e-48)
t
(if (<= y -2.5e-231)
(/ x (/ z t))
(if (<= y 1.8e+70) (* t (/ x z)) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e+27) {
tmp = t;
} else if (y <= -4.8e-25) {
tmp = t / (z / x);
} else if (y <= -9e-48) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 1.8e+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+27)) then
tmp = t
else if (y <= (-4.8d-25)) then
tmp = t / (z / x)
else if (y <= (-9d-48)) then
tmp = t
else if (y <= (-2.5d-231)) then
tmp = x / (z / t)
else if (y <= 1.8d+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+27) {
tmp = t;
} else if (y <= -4.8e-25) {
tmp = t / (z / x);
} else if (y <= -9e-48) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 1.8e+70) {
tmp = t * (x / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e+27: tmp = t elif y <= -4.8e-25: tmp = t / (z / x) elif y <= -9e-48: tmp = t elif y <= -2.5e-231: tmp = x / (z / t) elif y <= 1.8e+70: tmp = t * (x / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e+27) tmp = t; elseif (y <= -4.8e-25) tmp = Float64(t / Float64(z / x)); elseif (y <= -9e-48) tmp = t; elseif (y <= -2.5e-231) tmp = Float64(x / Float64(z / t)); elseif (y <= 1.8e+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+27) tmp = t; elseif (y <= -4.8e-25) tmp = t / (z / x); elseif (y <= -9e-48) tmp = t; elseif (y <= -2.5e-231) tmp = x / (z / t); elseif (y <= 1.8e+70) tmp = t * (x / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e+27], t, If[LessEqual[y, -4.8e-25], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e-48], t, If[LessEqual[y, -2.5e-231], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+70], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+27}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-25}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-48}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+70}:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.9499999999999999e27 or -4.80000000000000018e-25 < y < -8.99999999999999977e-48 or 1.8e70 < y Initial program 99.8%
associate-*l/72.6%
*-commutative72.6%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in y around inf 59.3%
if -1.9499999999999999e27 < y < -4.80000000000000018e-25Initial program 99.6%
associate-*l/93.4%
*-commutative93.4%
associate-*l/81.6%
Simplified81.6%
Taylor expanded in y around 0 46.2%
associate-/l*52.4%
Simplified52.4%
if -8.99999999999999977e-48 < y < -2.50000000000000012e-231Initial program 90.1%
Taylor expanded in y around 0 57.3%
associate-*l/54.1%
associate-/l*63.2%
Applied egg-rr63.2%
if -2.50000000000000012e-231 < y < 1.8e70Initial program 97.0%
Taylor expanded in y around 0 63.0%
Final simplification60.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e+27)
t
(if (<= y -1.65e-23)
(/ t (/ z x))
(if (<= y -4.5e-48)
t
(if (<= y -2.5e-231)
(/ x (/ z t))
(if (<= y 3.8e+70) (/ (* x t) z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+27) {
tmp = t;
} else if (y <= -1.65e-23) {
tmp = t / (z / x);
} else if (y <= -4.5e-48) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 3.8e+70) {
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 <= (-7.5d+27)) then
tmp = t
else if (y <= (-1.65d-23)) then
tmp = t / (z / x)
else if (y <= (-4.5d-48)) then
tmp = t
else if (y <= (-2.5d-231)) then
tmp = x / (z / t)
else if (y <= 3.8d+70) 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 <= -7.5e+27) {
tmp = t;
} else if (y <= -1.65e-23) {
tmp = t / (z / x);
} else if (y <= -4.5e-48) {
tmp = t;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 3.8e+70) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+27: tmp = t elif y <= -1.65e-23: tmp = t / (z / x) elif y <= -4.5e-48: tmp = t elif y <= -2.5e-231: tmp = x / (z / t) elif y <= 3.8e+70: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+27) tmp = t; elseif (y <= -1.65e-23) tmp = Float64(t / Float64(z / x)); elseif (y <= -4.5e-48) tmp = t; elseif (y <= -2.5e-231) tmp = Float64(x / Float64(z / t)); elseif (y <= 3.8e+70) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e+27) tmp = t; elseif (y <= -1.65e-23) tmp = t / (z / x); elseif (y <= -4.5e-48) tmp = t; elseif (y <= -2.5e-231) tmp = x / (z / t); elseif (y <= 3.8e+70) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+27], t, If[LessEqual[y, -1.65e-23], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.5e-48], t, If[LessEqual[y, -2.5e-231], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+70], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+27}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-23}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -4.5 \cdot 10^{-48}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+70}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -7.5000000000000002e27 or -1.6500000000000001e-23 < y < -4.49999999999999988e-48 or 3.7999999999999998e70 < y Initial program 99.8%
associate-*l/72.6%
*-commutative72.6%
associate-*l/77.4%
Simplified77.4%
Taylor expanded in y around inf 59.3%
if -7.5000000000000002e27 < y < -1.6500000000000001e-23Initial program 99.6%
associate-*l/93.4%
*-commutative93.4%
associate-*l/81.6%
Simplified81.6%
Taylor expanded in y around 0 46.2%
associate-/l*52.4%
Simplified52.4%
if -4.49999999999999988e-48 < y < -2.50000000000000012e-231Initial program 90.1%
Taylor expanded in y around 0 57.3%
associate-*l/54.1%
associate-/l*63.2%
Applied egg-rr63.2%
if -2.50000000000000012e-231 < y < 3.7999999999999998e70Initial program 97.0%
associate-*l/96.9%
*-commutative96.9%
associate-*l/91.6%
Simplified91.6%
Taylor expanded in y around 0 63.6%
Final simplification61.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.65e+28)
t
(if (<= y -8.2e-13)
(/ t (/ z x))
(if (<= y -1.9e-47)
(* (/ t z) (- y))
(if (<= y -2.5e-231)
(/ x (/ z t))
(if (<= y 1e+73) (/ (* x t) z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.65e+28) {
tmp = t;
} else if (y <= -8.2e-13) {
tmp = t / (z / x);
} else if (y <= -1.9e-47) {
tmp = (t / z) * -y;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 1e+73) {
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 <= (-3.65d+28)) then
tmp = t
else if (y <= (-8.2d-13)) then
tmp = t / (z / x)
else if (y <= (-1.9d-47)) then
tmp = (t / z) * -y
else if (y <= (-2.5d-231)) then
tmp = x / (z / t)
else if (y <= 1d+73) 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 <= -3.65e+28) {
tmp = t;
} else if (y <= -8.2e-13) {
tmp = t / (z / x);
} else if (y <= -1.9e-47) {
tmp = (t / z) * -y;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 1e+73) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.65e+28: tmp = t elif y <= -8.2e-13: tmp = t / (z / x) elif y <= -1.9e-47: tmp = (t / z) * -y elif y <= -2.5e-231: tmp = x / (z / t) elif y <= 1e+73: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.65e+28) tmp = t; elseif (y <= -8.2e-13) tmp = Float64(t / Float64(z / x)); elseif (y <= -1.9e-47) tmp = Float64(Float64(t / z) * Float64(-y)); elseif (y <= -2.5e-231) tmp = Float64(x / Float64(z / t)); elseif (y <= 1e+73) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.65e+28) tmp = t; elseif (y <= -8.2e-13) tmp = t / (z / x); elseif (y <= -1.9e-47) tmp = (t / z) * -y; elseif (y <= -2.5e-231) tmp = x / (z / t); elseif (y <= 1e+73) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.65e+28], t, If[LessEqual[y, -8.2e-13], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-47], N[(N[(t / z), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[y, -2.5e-231], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+73], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.65 \cdot 10^{+28}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-13}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-47}:\\
\;\;\;\;\frac{t}{z} \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 10^{+73}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.6499999999999999e28 or 9.99999999999999983e72 < y Initial program 99.8%
associate-*l/69.9%
*-commutative69.9%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around inf 61.3%
if -3.6499999999999999e28 < y < -8.2000000000000004e-13Initial program 99.6%
associate-*l/91.2%
*-commutative91.2%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around 0 54.9%
associate-/l*63.5%
Simplified63.5%
if -8.2000000000000004e-13 < y < -1.90000000000000007e-47Initial program 99.6%
associate-*l/99.8%
*-commutative99.8%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in z around inf 49.4%
Taylor expanded in x around 0 36.0%
mul-1-neg36.0%
associate-*l/35.7%
*-commutative35.7%
Simplified35.7%
if -1.90000000000000007e-47 < y < -2.50000000000000012e-231Initial program 90.1%
Taylor expanded in y around 0 57.3%
associate-*l/54.1%
associate-/l*63.2%
Applied egg-rr63.2%
if -2.50000000000000012e-231 < y < 9.99999999999999983e72Initial program 97.0%
associate-*l/96.9%
*-commutative96.9%
associate-*l/91.6%
Simplified91.6%
Taylor expanded in y around 0 63.6%
Final simplification61.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.2e+28)
t
(if (<= y -1.15e-12)
(/ t (/ z x))
(if (<= y -1.9e-48)
(/ (* y (- t)) z)
(if (<= y -2.5e-231)
(/ x (/ z t))
(if (<= y 2.7e+72) (/ (* x t) z) t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.2e+28) {
tmp = t;
} else if (y <= -1.15e-12) {
tmp = t / (z / x);
} else if (y <= -1.9e-48) {
tmp = (y * -t) / z;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 2.7e+72) {
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 <= (-4.2d+28)) then
tmp = t
else if (y <= (-1.15d-12)) then
tmp = t / (z / x)
else if (y <= (-1.9d-48)) then
tmp = (y * -t) / z
else if (y <= (-2.5d-231)) then
tmp = x / (z / t)
else if (y <= 2.7d+72) 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 <= -4.2e+28) {
tmp = t;
} else if (y <= -1.15e-12) {
tmp = t / (z / x);
} else if (y <= -1.9e-48) {
tmp = (y * -t) / z;
} else if (y <= -2.5e-231) {
tmp = x / (z / t);
} else if (y <= 2.7e+72) {
tmp = (x * t) / z;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.2e+28: tmp = t elif y <= -1.15e-12: tmp = t / (z / x) elif y <= -1.9e-48: tmp = (y * -t) / z elif y <= -2.5e-231: tmp = x / (z / t) elif y <= 2.7e+72: tmp = (x * t) / z else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.2e+28) tmp = t; elseif (y <= -1.15e-12) tmp = Float64(t / Float64(z / x)); elseif (y <= -1.9e-48) tmp = Float64(Float64(y * Float64(-t)) / z); elseif (y <= -2.5e-231) tmp = Float64(x / Float64(z / t)); elseif (y <= 2.7e+72) tmp = Float64(Float64(x * t) / z); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.2e+28) tmp = t; elseif (y <= -1.15e-12) tmp = t / (z / x); elseif (y <= -1.9e-48) tmp = (y * -t) / z; elseif (y <= -2.5e-231) tmp = x / (z / t); elseif (y <= 2.7e+72) tmp = (x * t) / z; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.2e+28], t, If[LessEqual[y, -1.15e-12], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-48], N[(N[(y * (-t)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.5e-231], N[(x / N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+72], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+28}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-12}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-48}:\\
\;\;\;\;\frac{y \cdot \left(-t\right)}{z}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-231}:\\
\;\;\;\;\frac{x}{\frac{z}{t}}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+72}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.19999999999999978e28 or 2.7000000000000001e72 < y Initial program 99.8%
associate-*l/69.9%
*-commutative69.9%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around inf 61.3%
if -4.19999999999999978e28 < y < -1.14999999999999995e-12Initial program 99.6%
associate-*l/91.2%
*-commutative91.2%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around 0 54.9%
associate-/l*63.5%
Simplified63.5%
if -1.14999999999999995e-12 < y < -1.90000000000000001e-48Initial program 99.6%
associate-*l/99.8%
*-commutative99.8%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in z around inf 49.4%
Taylor expanded in x around 0 36.0%
mul-1-neg36.0%
associate-*l/35.7%
*-commutative35.7%
Simplified35.7%
Taylor expanded in y around 0 36.0%
if -1.90000000000000001e-48 < y < -2.50000000000000012e-231Initial program 90.1%
Taylor expanded in y around 0 57.3%
associate-*l/54.1%
associate-/l*63.2%
Applied egg-rr63.2%
if -2.50000000000000012e-231 < y < 2.7000000000000001e72Initial program 97.0%
associate-*l/96.9%
*-commutative96.9%
associate-*l/91.6%
Simplified91.6%
Taylor expanded in y around 0 63.6%
Final simplification61.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- x y) (/ t z))))
(if (<= y -4.8e+29)
t
(if (<= y -5.8e-218)
t_1
(if (<= y 7.2e-249) (/ (* x t) z) (if (<= y 2.55e+79) t_1 t))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - y) * (t / z);
double tmp;
if (y <= -4.8e+29) {
tmp = t;
} else if (y <= -5.8e-218) {
tmp = t_1;
} else if (y <= 7.2e-249) {
tmp = (x * t) / z;
} else if (y <= 2.55e+79) {
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 = (x - y) * (t / z)
if (y <= (-4.8d+29)) then
tmp = t
else if (y <= (-5.8d-218)) then
tmp = t_1
else if (y <= 7.2d-249) then
tmp = (x * t) / z
else if (y <= 2.55d+79) 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 = (x - y) * (t / z);
double tmp;
if (y <= -4.8e+29) {
tmp = t;
} else if (y <= -5.8e-218) {
tmp = t_1;
} else if (y <= 7.2e-249) {
tmp = (x * t) / z;
} else if (y <= 2.55e+79) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - y) * (t / z) tmp = 0 if y <= -4.8e+29: tmp = t elif y <= -5.8e-218: tmp = t_1 elif y <= 7.2e-249: tmp = (x * t) / z elif y <= 2.55e+79: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - y) * Float64(t / z)) tmp = 0.0 if (y <= -4.8e+29) tmp = t; elseif (y <= -5.8e-218) tmp = t_1; elseif (y <= 7.2e-249) tmp = Float64(Float64(x * t) / z); elseif (y <= 2.55e+79) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - y) * (t / z); tmp = 0.0; if (y <= -4.8e+29) tmp = t; elseif (y <= -5.8e-218) tmp = t_1; elseif (y <= 7.2e-249) tmp = (x * t) / z; elseif (y <= 2.55e+79) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+29], t, If[LessEqual[y, -5.8e-218], t$95$1, If[LessEqual[y, 7.2e-249], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.55e+79], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-249}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{+79}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.8000000000000002e29 or 2.5500000000000001e79 < y Initial program 99.8%
associate-*l/69.9%
*-commutative69.9%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around inf 61.3%
if -4.8000000000000002e29 < y < -5.8000000000000004e-218 or 7.19999999999999989e-249 < y < 2.5500000000000001e79Initial program 96.6%
associate-*l/92.8%
*-commutative92.8%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in z around inf 65.0%
if -5.8000000000000004e-218 < y < 7.19999999999999989e-249Initial program 94.7%
associate-*l/99.2%
*-commutative99.2%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in y around 0 95.0%
Final simplification67.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.36e+29)
t
(if (<= y -4.1e-218)
(* (- x y) (/ t z))
(if (<= y 1.95e-245)
(/ (* x t) z)
(if (<= y 6.8e+177) (* x (/ t (- z y))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.36e+29) {
tmp = t;
} else if (y <= -4.1e-218) {
tmp = (x - y) * (t / z);
} else if (y <= 1.95e-245) {
tmp = (x * t) / z;
} else if (y <= 6.8e+177) {
tmp = x * (t / (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 <= (-1.36d+29)) then
tmp = t
else if (y <= (-4.1d-218)) then
tmp = (x - y) * (t / z)
else if (y <= 1.95d-245) then
tmp = (x * t) / z
else if (y <= 6.8d+177) then
tmp = x * (t / (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 <= -1.36e+29) {
tmp = t;
} else if (y <= -4.1e-218) {
tmp = (x - y) * (t / z);
} else if (y <= 1.95e-245) {
tmp = (x * t) / z;
} else if (y <= 6.8e+177) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.36e+29: tmp = t elif y <= -4.1e-218: tmp = (x - y) * (t / z) elif y <= 1.95e-245: tmp = (x * t) / z elif y <= 6.8e+177: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.36e+29) tmp = t; elseif (y <= -4.1e-218) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 1.95e-245) tmp = Float64(Float64(x * t) / z); elseif (y <= 6.8e+177) tmp = Float64(x * Float64(t / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.36e+29) tmp = t; elseif (y <= -4.1e-218) tmp = (x - y) * (t / z); elseif (y <= 1.95e-245) tmp = (x * t) / z; elseif (y <= 6.8e+177) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.36e+29], t, If[LessEqual[y, -4.1e-218], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-245], N[(N[(x * t), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.8e+177], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.36 \cdot 10^{+29}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-218}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-245}:\\
\;\;\;\;\frac{x \cdot t}{z}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+177}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.36e29 or 6.7999999999999996e177 < y Initial program 99.8%
associate-*l/70.1%
*-commutative70.1%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in y around inf 64.5%
if -1.36e29 < y < -4.0999999999999998e-218Initial program 95.9%
associate-*l/88.3%
*-commutative88.3%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in z around inf 62.2%
if -4.0999999999999998e-218 < y < 1.9499999999999999e-245Initial program 94.7%
associate-*l/99.2%
*-commutative99.2%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in y around 0 95.0%
if 1.9499999999999999e-245 < y < 6.7999999999999996e177Initial program 97.6%
clear-num97.7%
associate-/r/97.6%
Applied egg-rr97.6%
Taylor expanded in x around inf 61.6%
associate-/l*67.6%
Simplified67.6%
associate-/r/66.4%
Applied egg-rr66.4%
Final simplification69.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (* t (/ x (- z y)))))
(if (<= x -1.85e+31)
t_2
(if (<= x -7.5e-26)
t_1
(if (<= x -1.6e-116)
(* x (/ t (- z y)))
(if (<= x 9200000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -1.85e+31) {
tmp = t_2;
} else if (x <= -7.5e-26) {
tmp = t_1;
} else if (x <= -1.6e-116) {
tmp = x * (t / (z - y));
} else if (x <= 9200000000.0) {
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 = t * (y / (y - z))
t_2 = t * (x / (z - y))
if (x <= (-1.85d+31)) then
tmp = t_2
else if (x <= (-7.5d-26)) then
tmp = t_1
else if (x <= (-1.6d-116)) then
tmp = x * (t / (z - y))
else if (x <= 9200000000.0d0) 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 = t * (y / (y - z));
double t_2 = t * (x / (z - y));
double tmp;
if (x <= -1.85e+31) {
tmp = t_2;
} else if (x <= -7.5e-26) {
tmp = t_1;
} else if (x <= -1.6e-116) {
tmp = x * (t / (z - y));
} else if (x <= 9200000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t * (x / (z - y)) tmp = 0 if x <= -1.85e+31: tmp = t_2 elif x <= -7.5e-26: tmp = t_1 elif x <= -1.6e-116: tmp = x * (t / (z - y)) elif x <= 9200000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t * Float64(x / Float64(z - y))) tmp = 0.0 if (x <= -1.85e+31) tmp = t_2; elseif (x <= -7.5e-26) tmp = t_1; elseif (x <= -1.6e-116) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (x <= 9200000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t * (x / (z - y)); tmp = 0.0; if (x <= -1.85e+31) tmp = t_2; elseif (x <= -7.5e-26) tmp = t_1; elseif (x <= -1.6e-116) tmp = x * (t / (z - y)); elseif (x <= 9200000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.85e+31], t$95$2, If[LessEqual[x, -7.5e-26], t$95$1, If[LessEqual[x, -1.6e-116], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9200000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := t \cdot \frac{x}{z - y}\\
\mathbf{if}\;x \leq -1.85 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-116}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;x \leq 9200000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.8499999999999999e31 or 9.2e9 < x Initial program 99.0%
Taylor expanded in x around inf 82.9%
if -1.8499999999999999e31 < x < -7.4999999999999994e-26 or -1.60000000000000005e-116 < x < 9.2e9Initial program 95.8%
Taylor expanded in x around 0 80.4%
neg-mul-180.4%
distribute-neg-frac80.4%
Simplified80.4%
frac-2neg80.4%
div-inv80.2%
remove-double-neg80.2%
sub-neg80.2%
distribute-neg-in80.2%
remove-double-neg80.2%
Applied egg-rr80.2%
associate-*r/80.4%
*-rgt-identity80.4%
+-commutative80.4%
unsub-neg80.4%
Simplified80.4%
if -7.4999999999999994e-26 < x < -1.60000000000000005e-116Initial program 99.6%
clear-num99.4%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in x around inf 76.9%
associate-/l*78.0%
Simplified78.0%
associate-/r/78.0%
Applied egg-rr78.0%
Final simplification81.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* t (/ y (- y z)))) (t_2 (/ t (/ (- z y) x))))
(if (<= x -2e+31)
t_2
(if (<= x -1.9e-25)
t_1
(if (<= x -1.6e-116)
(* x (/ t (- z y)))
(if (<= x 3400000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = t * (y / (y - z));
double t_2 = t / ((z - y) / x);
double tmp;
if (x <= -2e+31) {
tmp = t_2;
} else if (x <= -1.9e-25) {
tmp = t_1;
} else if (x <= -1.6e-116) {
tmp = x * (t / (z - y));
} else if (x <= 3400000000.0) {
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 = t * (y / (y - z))
t_2 = t / ((z - y) / x)
if (x <= (-2d+31)) then
tmp = t_2
else if (x <= (-1.9d-25)) then
tmp = t_1
else if (x <= (-1.6d-116)) then
tmp = x * (t / (z - y))
else if (x <= 3400000000.0d0) 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 = t * (y / (y - z));
double t_2 = t / ((z - y) / x);
double tmp;
if (x <= -2e+31) {
tmp = t_2;
} else if (x <= -1.9e-25) {
tmp = t_1;
} else if (x <= -1.6e-116) {
tmp = x * (t / (z - y));
} else if (x <= 3400000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = t * (y / (y - z)) t_2 = t / ((z - y) / x) tmp = 0 if x <= -2e+31: tmp = t_2 elif x <= -1.9e-25: tmp = t_1 elif x <= -1.6e-116: tmp = x * (t / (z - y)) elif x <= 3400000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(t * Float64(y / Float64(y - z))) t_2 = Float64(t / Float64(Float64(z - y) / x)) tmp = 0.0 if (x <= -2e+31) tmp = t_2; elseif (x <= -1.9e-25) tmp = t_1; elseif (x <= -1.6e-116) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (x <= 3400000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t * (y / (y - z)); t_2 = t / ((z - y) / x); tmp = 0.0; if (x <= -2e+31) tmp = t_2; elseif (x <= -1.9e-25) tmp = t_1; elseif (x <= -1.6e-116) tmp = x * (t / (z - y)); elseif (x <= 3400000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+31], t$95$2, If[LessEqual[x, -1.9e-25], t$95$1, If[LessEqual[x, -1.6e-116], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3400000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{y - z}\\
t_2 := \frac{t}{\frac{z - y}{x}}\\
\mathbf{if}\;x \leq -2 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-116}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;x \leq 3400000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.9999999999999999e31 or 3.4e9 < x Initial program 99.0%
clear-num99.0%
associate-/r/98.9%
Applied egg-rr98.9%
Taylor expanded in x around inf 71.5%
associate-/l*82.9%
Simplified82.9%
if -1.9999999999999999e31 < x < -1.8999999999999999e-25 or -1.60000000000000005e-116 < x < 3.4e9Initial program 95.8%
Taylor expanded in x around 0 80.4%
neg-mul-180.4%
distribute-neg-frac80.4%
Simplified80.4%
frac-2neg80.4%
div-inv80.2%
remove-double-neg80.2%
sub-neg80.2%
distribute-neg-in80.2%
remove-double-neg80.2%
Applied egg-rr80.2%
associate-*r/80.4%
*-rgt-identity80.4%
+-commutative80.4%
unsub-neg80.4%
Simplified80.4%
if -1.8999999999999999e-25 < x < -1.60000000000000005e-116Initial program 99.6%
clear-num99.4%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in x around inf 76.9%
associate-/l*78.0%
Simplified78.0%
associate-/r/78.0%
Applied egg-rr78.0%
Final simplification81.5%
(FPCore (x y z t)
:precision binary64
(if (<= x -6.5e+227)
(/ t (/ (- z y) x))
(if (or (<= x -5.8e-223) (not (<= x 1.4e-209)))
(* (- x y) (/ t (- z y)))
(* t (/ y (- y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -6.5e+227) {
tmp = t / ((z - y) / x);
} else if ((x <= -5.8e-223) || !(x <= 1.4e-209)) {
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 (x <= (-6.5d+227)) then
tmp = t / ((z - y) / x)
else if ((x <= (-5.8d-223)) .or. (.not. (x <= 1.4d-209))) 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 (x <= -6.5e+227) {
tmp = t / ((z - y) / x);
} else if ((x <= -5.8e-223) || !(x <= 1.4e-209)) {
tmp = (x - y) * (t / (z - y));
} else {
tmp = t * (y / (y - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -6.5e+227: tmp = t / ((z - y) / x) elif (x <= -5.8e-223) or not (x <= 1.4e-209): tmp = (x - y) * (t / (z - y)) else: tmp = t * (y / (y - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -6.5e+227) tmp = Float64(t / Float64(Float64(z - y) / x)); elseif ((x <= -5.8e-223) || !(x <= 1.4e-209)) 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 (x <= -6.5e+227) tmp = t / ((z - y) / x); elseif ((x <= -5.8e-223) || ~((x <= 1.4e-209))) tmp = (x - y) * (t / (z - y)); else tmp = t * (y / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -6.5e+227], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -5.8e-223], N[Not[LessEqual[x, 1.4e-209]], $MachinePrecision]], 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}\;x \leq -6.5 \cdot 10^{+227}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-223} \lor \neg \left(x \leq 1.4 \cdot 10^{-209}\right):\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\end{array}
\end{array}
if x < -6.50000000000000018e227Initial program 96.1%
clear-num96.1%
associate-/r/96.1%
Applied egg-rr96.1%
Taylor expanded in x around inf 77.4%
associate-/l*92.2%
Simplified92.2%
if -6.50000000000000018e227 < x < -5.8000000000000001e-223 or 1.40000000000000006e-209 < x Initial program 97.4%
associate-*l/85.0%
*-commutative85.0%
associate-*l/88.1%
Simplified88.1%
if -5.8000000000000001e-223 < x < 1.40000000000000006e-209Initial program 100.0%
Taylor expanded in x around 0 97.0%
neg-mul-197.0%
distribute-neg-frac97.0%
Simplified97.0%
frac-2neg97.0%
div-inv96.8%
remove-double-neg96.8%
sub-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
Applied egg-rr96.8%
associate-*r/97.0%
*-rgt-identity97.0%
+-commutative97.0%
unsub-neg97.0%
Simplified97.0%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (<= y -1.05e+30) t (if (<= y 7.2e+177) (* t (/ x (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e+30) {
tmp = t;
} else if (y <= 7.2e+177) {
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 <= (-1.05d+30)) then
tmp = t
else if (y <= 7.2d+177) 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 <= -1.05e+30) {
tmp = t;
} else if (y <= 7.2e+177) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.05e+30: tmp = t elif y <= 7.2e+177: tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.05e+30) tmp = t; elseif (y <= 7.2e+177) 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 <= -1.05e+30) tmp = t; elseif (y <= 7.2e+177) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.05e+30], t, If[LessEqual[y, 7.2e+177], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+30}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+177}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.05e30 or 7.20000000000000005e177 < y Initial program 99.8%
associate-*l/70.1%
*-commutative70.1%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in y around inf 64.5%
if -1.05e30 < y < 7.20000000000000005e177Initial program 96.5%
Taylor expanded in x around inf 71.1%
Final simplification69.0%
(FPCore (x y z t) :precision binary64 (if (<= y -2.05e+27) t (if (<= y 2.3e+80) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.05e+27) {
tmp = t;
} else if (y <= 2.3e+80) {
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 <= (-2.05d+27)) then
tmp = t
else if (y <= 2.3d+80) 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 <= -2.05e+27) {
tmp = t;
} else if (y <= 2.3e+80) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.05e+27: tmp = t elif y <= 2.3e+80: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.05e+27) tmp = t; elseif (y <= 2.3e+80) 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 <= -2.05e+27) tmp = t; elseif (y <= 2.3e+80) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.05e+27], t, If[LessEqual[y, 2.3e+80], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{+27}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.0500000000000001e27 or 2.30000000000000004e80 < y Initial program 99.8%
associate-*l/69.9%
*-commutative69.9%
associate-*l/75.2%
Simplified75.2%
Taylor expanded in y around inf 61.3%
if -2.0500000000000001e27 < y < 2.30000000000000004e80Initial program 96.1%
associate-*l/94.3%
*-commutative94.3%
associate-*l/91.9%
Simplified91.9%
Taylor expanded in y around 0 57.0%
associate-/l*57.8%
Simplified57.8%
associate-/r/55.5%
Applied egg-rr55.5%
Final simplification57.8%
(FPCore (x y z t) :precision binary64 t)
double code(double x, double y, double z, double t) {
return t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t
end function
public static double code(double x, double y, double z, double t) {
return t;
}
def code(x, y, z, t): return t
function code(x, y, z, t) return t end
function tmp = code(x, y, z, t) tmp = t; end
code[x_, y_, z_, t_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 97.6%
associate-*l/84.7%
*-commutative84.7%
associate-*l/85.4%
Simplified85.4%
Taylor expanded in y around inf 31.6%
Final simplification31.6%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2023311
(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))