
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (/ (- x y) (- z y)) t))
double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x - y) / (z - y)) * t
end function
public static double code(double x, double y, double z, double t) {
return ((x - y) / (z - y)) * t;
}
def code(x, y, z, t): return ((x - y) / (z - y)) * t
function code(x, y, z, t) return Float64(Float64(Float64(x - y) / Float64(z - y)) * t) end
function tmp = code(x, y, z, t) tmp = ((x - y) / (z - y)) * t; end
code[x_, y_, z_, t_] := N[(N[(N[(x - y), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{z - y} \cdot t
\end{array}
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
Initial program 97.6%
associate-*l/85.5%
associate-/l*85.3%
Simplified85.3%
associate-*r/85.5%
associate-*l/97.6%
*-commutative97.6%
clear-num97.5%
un-div-inv97.8%
Applied egg-rr97.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ t (/ (- z y) x))))
(if (<= x -3.8e-8)
t_1
(if (<= x 7.8e-61)
(* t (/ y (- y z)))
(if (<= x 8.5e-6)
(* x (/ t (- z y)))
(if (<= x 3.3e+66) (* 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 <= -3.8e-8) {
tmp = t_1;
} else if (x <= 7.8e-61) {
tmp = t * (y / (y - z));
} else if (x <= 8.5e-6) {
tmp = x * (t / (z - y));
} else if (x <= 3.3e+66) {
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 <= (-3.8d-8)) then
tmp = t_1
else if (x <= 7.8d-61) then
tmp = t * (y / (y - z))
else if (x <= 8.5d-6) then
tmp = x * (t / (z - y))
else if (x <= 3.3d+66) 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 <= -3.8e-8) {
tmp = t_1;
} else if (x <= 7.8e-61) {
tmp = t * (y / (y - z));
} else if (x <= 8.5e-6) {
tmp = x * (t / (z - y));
} else if (x <= 3.3e+66) {
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 <= -3.8e-8: tmp = t_1 elif x <= 7.8e-61: tmp = t * (y / (y - z)) elif x <= 8.5e-6: tmp = x * (t / (z - y)) elif x <= 3.3e+66: 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 <= -3.8e-8) tmp = t_1; elseif (x <= 7.8e-61) tmp = Float64(t * Float64(y / Float64(y - z))); elseif (x <= 8.5e-6) tmp = Float64(x * Float64(t / Float64(z - y))); elseif (x <= 3.3e+66) 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 <= -3.8e-8) tmp = t_1; elseif (x <= 7.8e-61) tmp = t * (y / (y - z)); elseif (x <= 8.5e-6) tmp = x * (t / (z - y)); elseif (x <= 3.3e+66) 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, -3.8e-8], t$95$1, If[LessEqual[x, 7.8e-61], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e-6], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.3e+66], 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 -3.8 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-61}:\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+66}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.80000000000000028e-8 or 3.3000000000000001e66 < x Initial program 98.9%
associate-*l/85.1%
associate-/l*87.1%
Simplified87.1%
associate-*r/85.1%
associate-*l/98.9%
*-commutative98.9%
clear-num98.8%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 84.7%
if -3.80000000000000028e-8 < x < 7.80000000000000065e-61Initial program 95.8%
Taylor expanded in x around 0 84.5%
neg-mul-184.5%
distribute-neg-frac284.5%
Simplified84.5%
if 7.80000000000000065e-61 < x < 8.4999999999999999e-6Initial program 99.6%
associate-*l/87.9%
associate-/l*100.0%
Simplified100.0%
associate-*r/87.9%
associate-*l/99.6%
*-commutative99.6%
clear-num99.4%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 88.7%
associate-/r/88.9%
Applied egg-rr88.9%
if 8.4999999999999999e-6 < x < 3.3000000000000001e66Initial program 99.7%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
Simplified68.2%
Final simplification83.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -3e+72)
t
(if (<= y 0.0023)
(* (- x y) (/ t z))
(if (<= y 4.9e+87) t (if (<= y 4.4e+128) (/ t (/ y (- x))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3e+72) {
tmp = t;
} else if (y <= 0.0023) {
tmp = (x - y) * (t / z);
} else if (y <= 4.9e+87) {
tmp = t;
} else if (y <= 4.4e+128) {
tmp = t / (y / -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 <= (-3d+72)) then
tmp = t
else if (y <= 0.0023d0) then
tmp = (x - y) * (t / z)
else if (y <= 4.9d+87) then
tmp = t
else if (y <= 4.4d+128) then
tmp = t / (y / -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 <= -3e+72) {
tmp = t;
} else if (y <= 0.0023) {
tmp = (x - y) * (t / z);
} else if (y <= 4.9e+87) {
tmp = t;
} else if (y <= 4.4e+128) {
tmp = t / (y / -x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3e+72: tmp = t elif y <= 0.0023: tmp = (x - y) * (t / z) elif y <= 4.9e+87: tmp = t elif y <= 4.4e+128: tmp = t / (y / -x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3e+72) tmp = t; elseif (y <= 0.0023) tmp = Float64(Float64(x - y) * Float64(t / z)); elseif (y <= 4.9e+87) tmp = t; elseif (y <= 4.4e+128) tmp = Float64(t / Float64(y / Float64(-x))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3e+72) tmp = t; elseif (y <= 0.0023) tmp = (x - y) * (t / z); elseif (y <= 4.9e+87) tmp = t; elseif (y <= 4.4e+128) tmp = t / (y / -x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3e+72], t, If[LessEqual[y, 0.0023], N[(N[(x - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e+87], t, If[LessEqual[y, 4.4e+128], N[(t / N[(y / (-x)), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+72}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.0023:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+87}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+128}:\\
\;\;\;\;\frac{t}{\frac{y}{-x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.00000000000000003e72 or 0.0023 < y < 4.89999999999999971e87 or 4.40000000000000033e128 < y Initial program 99.9%
associate-*l/71.2%
associate-/l*74.3%
Simplified74.3%
Taylor expanded in y around inf 65.2%
if -3.00000000000000003e72 < y < 0.0023Initial program 96.1%
associate-*l/96.1%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in z around inf 79.1%
*-commutative79.1%
associate-/l*76.2%
Simplified76.2%
if 4.89999999999999971e87 < y < 4.40000000000000033e128Initial program 99.3%
associate-*l/58.1%
associate-/l*87.8%
Simplified87.8%
associate-*r/58.1%
associate-*l/99.3%
*-commutative99.3%
clear-num99.1%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 98.7%
Taylor expanded in z around 0 57.5%
neg-mul-157.5%
distribute-neg-frac257.5%
Simplified57.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.2e+54)
t
(if (<= y 0.0022)
(/ t (/ z x))
(if (<= y 1.5e+84) t (if (<= y 1.45e+128) (/ t (/ y (- x))) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+54) {
tmp = t;
} else if (y <= 0.0022) {
tmp = t / (z / x);
} else if (y <= 1.5e+84) {
tmp = t;
} else if (y <= 1.45e+128) {
tmp = t / (y / -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 <= (-3.2d+54)) then
tmp = t
else if (y <= 0.0022d0) then
tmp = t / (z / x)
else if (y <= 1.5d+84) then
tmp = t
else if (y <= 1.45d+128) then
tmp = t / (y / -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 <= -3.2e+54) {
tmp = t;
} else if (y <= 0.0022) {
tmp = t / (z / x);
} else if (y <= 1.5e+84) {
tmp = t;
} else if (y <= 1.45e+128) {
tmp = t / (y / -x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e+54: tmp = t elif y <= 0.0022: tmp = t / (z / x) elif y <= 1.5e+84: tmp = t elif y <= 1.45e+128: tmp = t / (y / -x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e+54) tmp = t; elseif (y <= 0.0022) tmp = Float64(t / Float64(z / x)); elseif (y <= 1.5e+84) tmp = t; elseif (y <= 1.45e+128) tmp = Float64(t / Float64(y / Float64(-x))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e+54) tmp = t; elseif (y <= 0.0022) tmp = t / (z / x); elseif (y <= 1.5e+84) tmp = t; elseif (y <= 1.45e+128) tmp = t / (y / -x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e+54], t, If[LessEqual[y, 0.0022], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+84], t, If[LessEqual[y, 1.45e+128], N[(t / N[(y / (-x)), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+54}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.0022:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+84}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+128}:\\
\;\;\;\;\frac{t}{\frac{y}{-x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.2e54 or 0.00220000000000000013 < y < 1.49999999999999998e84 or 1.45e128 < y Initial program 99.8%
associate-*l/71.7%
associate-/l*73.7%
Simplified73.7%
Taylor expanded in y around inf 62.7%
if -3.2e54 < y < 0.00220000000000000013Initial program 96.0%
associate-*l/96.6%
associate-/l*93.1%
Simplified93.1%
associate-*r/96.6%
associate-*l/96.0%
*-commutative96.0%
clear-num95.8%
un-div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in y around 0 71.8%
if 1.49999999999999998e84 < y < 1.45e128Initial program 99.3%
associate-*l/58.1%
associate-/l*87.8%
Simplified87.8%
associate-*r/58.1%
associate-*l/99.3%
*-commutative99.3%
clear-num99.1%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 98.7%
Taylor expanded in z around 0 57.5%
neg-mul-157.5%
distribute-neg-frac257.5%
Simplified57.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.25e+57)
t
(if (<= y 8.5e-5)
(/ t (/ z x))
(if (<= y 1.2e+88) t (if (<= y 9.8e+127) (* t (/ (- x) y)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+57) {
tmp = t;
} else if (y <= 8.5e-5) {
tmp = t / (z / x);
} else if (y <= 1.2e+88) {
tmp = t;
} else if (y <= 9.8e+127) {
tmp = t * (-x / y);
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.25d+57)) then
tmp = t
else if (y <= 8.5d-5) then
tmp = t / (z / x)
else if (y <= 1.2d+88) then
tmp = t
else if (y <= 9.8d+127) then
tmp = t * (-x / y)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+57) {
tmp = t;
} else if (y <= 8.5e-5) {
tmp = t / (z / x);
} else if (y <= 1.2e+88) {
tmp = t;
} else if (y <= 9.8e+127) {
tmp = t * (-x / y);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e+57: tmp = t elif y <= 8.5e-5: tmp = t / (z / x) elif y <= 1.2e+88: tmp = t elif y <= 9.8e+127: tmp = t * (-x / y) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e+57) tmp = t; elseif (y <= 8.5e-5) tmp = Float64(t / Float64(z / x)); elseif (y <= 1.2e+88) tmp = t; elseif (y <= 9.8e+127) 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 <= -1.25e+57) tmp = t; elseif (y <= 8.5e-5) tmp = t / (z / x); elseif (y <= 1.2e+88) tmp = t; elseif (y <= 9.8e+127) tmp = t * (-x / y); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+57], t, If[LessEqual[y, 8.5e-5], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+88], t, If[LessEqual[y, 9.8e+127], N[(t * N[((-x) / y), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+57}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+88}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \frac{-x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.24999999999999993e57 or 8.500000000000001e-5 < y < 1.2e88 or 9.80000000000000074e127 < y Initial program 99.8%
associate-*l/71.7%
associate-/l*73.7%
Simplified73.7%
Taylor expanded in y around inf 62.7%
if -1.24999999999999993e57 < y < 8.500000000000001e-5Initial program 96.0%
associate-*l/96.6%
associate-/l*93.1%
Simplified93.1%
associate-*r/96.6%
associate-*l/96.0%
*-commutative96.0%
clear-num95.8%
un-div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in y around 0 71.8%
if 1.2e88 < y < 9.80000000000000074e127Initial program 99.3%
associate-*l/58.1%
associate-/l*87.8%
Simplified87.8%
associate-*r/58.1%
associate-*l/99.3%
*-commutative99.3%
clear-num99.1%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 98.7%
Taylor expanded in z around 0 46.4%
mul-1-neg46.4%
associate-/l*57.3%
distribute-rgt-neg-in57.3%
Simplified57.3%
Final simplification67.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.9e+53)
t
(if (or (<= y 0.00175) (and (not (<= y 7.6e+89)) (<= y 1.25e+126)))
(/ t (/ z x))
t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.9e+53) {
tmp = t;
} else if ((y <= 0.00175) || (!(y <= 7.6e+89) && (y <= 1.25e+126))) {
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 <= (-4.9d+53)) then
tmp = t
else if ((y <= 0.00175d0) .or. (.not. (y <= 7.6d+89)) .and. (y <= 1.25d+126)) 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 <= -4.9e+53) {
tmp = t;
} else if ((y <= 0.00175) || (!(y <= 7.6e+89) && (y <= 1.25e+126))) {
tmp = t / (z / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.9e+53: tmp = t elif (y <= 0.00175) or (not (y <= 7.6e+89) and (y <= 1.25e+126)): tmp = t / (z / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.9e+53) tmp = t; elseif ((y <= 0.00175) || (!(y <= 7.6e+89) && (y <= 1.25e+126))) 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 <= -4.9e+53) tmp = t; elseif ((y <= 0.00175) || (~((y <= 7.6e+89)) && (y <= 1.25e+126))) tmp = t / (z / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.9e+53], t, If[Or[LessEqual[y, 0.00175], And[N[Not[LessEqual[y, 7.6e+89]], $MachinePrecision], LessEqual[y, 1.25e+126]]], N[(t / N[(z / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{+53}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.00175 \lor \neg \left(y \leq 7.6 \cdot 10^{+89}\right) \land y \leq 1.25 \cdot 10^{+126}:\\
\;\;\;\;\frac{t}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -4.90000000000000018e53 or 0.00175000000000000004 < y < 7.60000000000000047e89 or 1.24999999999999994e126 < y Initial program 99.8%
associate-*l/71.3%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in y around inf 61.5%
if -4.90000000000000018e53 < y < 0.00175000000000000004 or 7.60000000000000047e89 < y < 1.24999999999999994e126Initial program 96.2%
associate-*l/94.9%
associate-/l*92.7%
Simplified92.7%
associate-*r/94.9%
associate-*l/96.2%
*-commutative96.2%
clear-num95.9%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in y around 0 71.4%
Final simplification67.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e+58)
t
(if (<= y 0.0023)
(* t (/ x z))
(if (<= y 7.6e+89) t (if (<= y 2.2e+126) (* x (/ t z)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e+58) {
tmp = t;
} else if (y <= 0.0023) {
tmp = t * (x / z);
} else if (y <= 7.6e+89) {
tmp = t;
} else if (y <= 2.2e+126) {
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.2d+58)) then
tmp = t
else if (y <= 0.0023d0) then
tmp = t * (x / z)
else if (y <= 7.6d+89) then
tmp = t
else if (y <= 2.2d+126) 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.2e+58) {
tmp = t;
} else if (y <= 0.0023) {
tmp = t * (x / z);
} else if (y <= 7.6e+89) {
tmp = t;
} else if (y <= 2.2e+126) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e+58: tmp = t elif y <= 0.0023: tmp = t * (x / z) elif y <= 7.6e+89: tmp = t elif y <= 2.2e+126: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e+58) tmp = t; elseif (y <= 0.0023) tmp = Float64(t * Float64(x / z)); elseif (y <= 7.6e+89) tmp = t; elseif (y <= 2.2e+126) 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.2e+58) tmp = t; elseif (y <= 0.0023) tmp = t * (x / z); elseif (y <= 7.6e+89) tmp = t; elseif (y <= 2.2e+126) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e+58], t, If[LessEqual[y, 0.0023], N[(t * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+89], t, If[LessEqual[y, 2.2e+126], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+58}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.0023:\\
\;\;\;\;t \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+89}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+126}:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.2000000000000001e58 or 0.0023 < y < 7.60000000000000047e89 or 2.19999999999999999e126 < y Initial program 99.8%
associate-*l/71.3%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in y around inf 61.5%
if -2.2000000000000001e58 < y < 0.0023Initial program 96.0%
Taylor expanded in y around 0 71.7%
if 7.60000000000000047e89 < y < 2.19999999999999999e126Initial program 99.3%
associate-*l/59.7%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in y around 0 30.5%
*-commutative30.5%
associate-/l*63.2%
Simplified63.2%
Final simplification67.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9e+157) (not (<= y 4.2e+136))) (* t (/ y (- y z))) (* (- x y) (/ t (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e+157) || !(y <= 4.2e+136)) {
tmp = t * (y / (y - z));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9d+157)) .or. (.not. (y <= 4.2d+136))) then
tmp = t * (y / (y - z))
else
tmp = (x - y) * (t / (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e+157) || !(y <= 4.2e+136)) {
tmp = t * (y / (y - z));
} else {
tmp = (x - y) * (t / (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9e+157) or not (y <= 4.2e+136): tmp = t * (y / (y - z)) else: tmp = (x - y) * (t / (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9e+157) || !(y <= 4.2e+136)) tmp = Float64(t * Float64(y / Float64(y - z))); else tmp = Float64(Float64(x - y) * Float64(t / Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9e+157) || ~((y <= 4.2e+136))) tmp = t * (y / (y - z)); else tmp = (x - y) * (t / (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9e+157], N[Not[LessEqual[y, 4.2e+136]], $MachinePrecision]], N[(t * N[(y / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+157} \lor \neg \left(y \leq 4.2 \cdot 10^{+136}\right):\\
\;\;\;\;t \cdot \frac{y}{y - z}\\
\mathbf{else}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{t}{z - y}\\
\end{array}
\end{array}
if y < -8.9999999999999997e157 or 4.1999999999999998e136 < y Initial program 99.9%
Taylor expanded in x around 0 91.3%
neg-mul-191.3%
distribute-neg-frac291.3%
Simplified91.3%
if -8.9999999999999997e157 < y < 4.1999999999999998e136Initial program 97.0%
associate-*l/92.3%
associate-/l*91.1%
Simplified91.1%
Final simplification91.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.2e-8) (not (<= x 2.5e-61))) (/ t (/ (- z y) x)) (/ (* t y) (- y z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.2e-8) || !(x <= 2.5e-61)) {
tmp = t / ((z - y) / x);
} else {
tmp = (t * y) / (y - z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-1.2d-8)) .or. (.not. (x <= 2.5d-61))) then
tmp = t / ((z - y) / x)
else
tmp = (t * y) / (y - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.2e-8) || !(x <= 2.5e-61)) {
tmp = t / ((z - y) / x);
} else {
tmp = (t * y) / (y - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.2e-8) or not (x <= 2.5e-61): tmp = t / ((z - y) / x) else: tmp = (t * y) / (y - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.2e-8) || !(x <= 2.5e-61)) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = Float64(Float64(t * y) / Float64(y - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.2e-8) || ~((x <= 2.5e-61))) tmp = t / ((z - y) / x); else tmp = (t * y) / (y - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.2e-8], N[Not[LessEqual[x, 2.5e-61]], $MachinePrecision]], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{-8} \lor \neg \left(x \leq 2.5 \cdot 10^{-61}\right):\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot y}{y - z}\\
\end{array}
\end{array}
if x < -1.19999999999999999e-8 or 2.4999999999999999e-61 < x Initial program 99.0%
associate-*l/83.6%
associate-/l*87.9%
Simplified87.9%
associate-*r/83.6%
associate-*l/99.0%
*-commutative99.0%
clear-num99.0%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 79.5%
if -1.19999999999999999e-8 < x < 2.4999999999999999e-61Initial program 95.8%
Taylor expanded in x around 0 84.5%
neg-mul-184.5%
distribute-neg-frac284.5%
Simplified84.5%
Taylor expanded in t around 0 76.6%
Final simplification78.2%
(FPCore (x y z t) :precision binary64 (if (<= z -3.4e-30) (/ t (/ z (- x y))) (if (<= z 2.2e-15) (* t (/ (- y x) y)) (* t (/ (- x y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.4e-30) {
tmp = t / (z / (x - y));
} else if (z <= 2.2e-15) {
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 (z <= (-3.4d-30)) then
tmp = t / (z / (x - y))
else if (z <= 2.2d-15) 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 (z <= -3.4e-30) {
tmp = t / (z / (x - y));
} else if (z <= 2.2e-15) {
tmp = t * ((y - x) / y);
} else {
tmp = t * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.4e-30: tmp = t / (z / (x - y)) elif z <= 2.2e-15: tmp = t * ((y - x) / y) else: tmp = t * ((x - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.4e-30) tmp = Float64(t / Float64(z / Float64(x - y))); elseif (z <= 2.2e-15) 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 (z <= -3.4e-30) tmp = t / (z / (x - y)); elseif (z <= 2.2e-15) tmp = t * ((y - x) / y); else tmp = t * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.4e-30], N[(t / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-15], 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}\;z \leq -3.4 \cdot 10^{-30}:\\
\;\;\;\;\frac{t}{\frac{z}{x - y}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \frac{y - x}{y}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if z < -3.4000000000000003e-30Initial program 97.4%
associate-*l/85.7%
associate-/l*87.0%
Simplified87.0%
associate-*r/85.7%
associate-*l/97.4%
*-commutative97.4%
clear-num97.3%
un-div-inv97.4%
Applied egg-rr97.4%
Taylor expanded in z around inf 77.1%
if -3.4000000000000003e-30 < z < 2.19999999999999986e-15Initial program 98.9%
Taylor expanded in z around 0 82.3%
mul-1-neg82.3%
Simplified82.3%
if 2.19999999999999986e-15 < z Initial program 95.7%
Taylor expanded in z around inf 79.3%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.6e+75) t (if (<= y 1.2e+134) (/ t (/ (- z y) x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.6e+75) {
tmp = t;
} else if (y <= 1.2e+134) {
tmp = t / ((z - y) / 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.6d+75)) then
tmp = t
else if (y <= 1.2d+134) then
tmp = t / ((z - y) / 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.6e+75) {
tmp = t;
} else if (y <= 1.2e+134) {
tmp = t / ((z - y) / x);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.6e+75: tmp = t elif y <= 1.2e+134: tmp = t / ((z - y) / x) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.6e+75) tmp = t; elseif (y <= 1.2e+134) tmp = Float64(t / Float64(Float64(z - y) / x)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.6e+75) tmp = t; elseif (y <= 1.2e+134) tmp = t / ((z - y) / x); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.6e+75], t, If[LessEqual[y, 1.2e+134], N[(t / N[(N[(z - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.6 \cdot 10^{+75}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+134}:\\
\;\;\;\;\frac{t}{\frac{z - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.59999999999999992e75 or 1.20000000000000003e134 < y Initial program 99.9%
associate-*l/66.4%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in y around inf 70.0%
if -1.59999999999999992e75 < y < 1.20000000000000003e134Initial program 96.7%
associate-*l/93.1%
associate-/l*92.3%
Simplified92.3%
associate-*r/93.1%
associate-*l/96.7%
*-commutative96.7%
clear-num96.5%
un-div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in x around inf 77.9%
(FPCore (x y z t) :precision binary64 (if (<= y -3.5e+75) t (if (<= y 9.8e+127) (* t (/ x (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.5e+75) {
tmp = t;
} else if (y <= 9.8e+127) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.5d+75)) then
tmp = t
else if (y <= 9.8d+127) then
tmp = t * (x / (z - y))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.5e+75) {
tmp = t;
} else if (y <= 9.8e+127) {
tmp = t * (x / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.5e+75: tmp = t elif y <= 9.8e+127: tmp = t * (x / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.5e+75) tmp = t; elseif (y <= 9.8e+127) tmp = Float64(t * Float64(x / Float64(z - y))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.5e+75) tmp = t; elseif (y <= 9.8e+127) tmp = t * (x / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.5e+75], t, If[LessEqual[y, 9.8e+127], N[(t * N[(x / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+75}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+127}:\\
\;\;\;\;t \cdot \frac{x}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -3.4999999999999998e75 or 9.80000000000000074e127 < y Initial program 99.9%
associate-*l/66.4%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in y around inf 70.0%
if -3.4999999999999998e75 < y < 9.80000000000000074e127Initial program 96.7%
Taylor expanded in x around inf 77.4%
Final simplification75.3%
(FPCore (x y z t) :precision binary64 (if (<= y -1.68e+75) t (if (<= y 9.2e+128) (* x (/ t (- z y))) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.68e+75) {
tmp = t;
} else if (y <= 9.2e+128) {
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.68d+75)) then
tmp = t
else if (y <= 9.2d+128) 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.68e+75) {
tmp = t;
} else if (y <= 9.2e+128) {
tmp = x * (t / (z - y));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.68e+75: tmp = t elif y <= 9.2e+128: tmp = x * (t / (z - y)) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.68e+75) tmp = t; elseif (y <= 9.2e+128) 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.68e+75) tmp = t; elseif (y <= 9.2e+128) tmp = x * (t / (z - y)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.68e+75], t, If[LessEqual[y, 9.2e+128], N[(x * N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.68 \cdot 10^{+75}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+128}:\\
\;\;\;\;x \cdot \frac{t}{z - y}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -1.6799999999999999e75 or 9.19999999999999992e128 < y Initial program 99.9%
associate-*l/66.4%
associate-/l*67.9%
Simplified67.9%
Taylor expanded in y around inf 70.0%
if -1.6799999999999999e75 < y < 9.19999999999999992e128Initial program 96.7%
associate-*l/93.1%
associate-/l*92.3%
Simplified92.3%
associate-*r/93.1%
associate-*l/96.7%
*-commutative96.7%
clear-num96.5%
un-div-inv97.0%
Applied egg-rr97.0%
Taylor expanded in x around inf 77.9%
associate-/r/73.9%
Applied egg-rr73.9%
Final simplification72.8%
(FPCore (x y z t) :precision binary64 (if (<= y -29.0) t (if (<= y 0.000265) (* x (/ t z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -29.0) {
tmp = t;
} else if (y <= 0.000265) {
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 <= (-29.0d0)) then
tmp = t
else if (y <= 0.000265d0) 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 <= -29.0) {
tmp = t;
} else if (y <= 0.000265) {
tmp = x * (t / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -29.0: tmp = t elif y <= 0.000265: tmp = x * (t / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -29.0) tmp = t; elseif (y <= 0.000265) 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 <= -29.0) tmp = t; elseif (y <= 0.000265) tmp = x * (t / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -29.0], t, If[LessEqual[y, 0.000265], N[(x * N[(t / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -29:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 0.000265:\\
\;\;\;\;x \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -29 or 2.6499999999999999e-4 < y Initial program 99.8%
associate-*l/72.8%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in y around inf 55.4%
if -29 < y < 2.6499999999999999e-4Initial program 95.8%
associate-*l/96.4%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in y around 0 71.4%
*-commutative71.4%
associate-/l*70.7%
Simplified70.7%
(FPCore (x y z t) :precision binary64 (if (<= y -2.7e-28) t (if (<= y 3e-5) (* t (/ y z)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-28) {
tmp = t;
} else if (y <= 3e-5) {
tmp = t * (y / 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.7d-28)) then
tmp = t
else if (y <= 3d-5) then
tmp = t * (y / 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.7e-28) {
tmp = t;
} else if (y <= 3e-5) {
tmp = t * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e-28: tmp = t elif y <= 3e-5: tmp = t * (y / z) else: tmp = t return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e-28) tmp = t; elseif (y <= 3e-5) tmp = Float64(t * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.7e-28) tmp = t; elseif (y <= 3e-5) tmp = t * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e-28], t, If[LessEqual[y, 3e-5], N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-28}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-5}:\\
\;\;\;\;t \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if y < -2.6999999999999999e-28 or 3.00000000000000008e-5 < y Initial program 99.8%
associate-*l/74.3%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in y around inf 53.4%
if -2.6999999999999999e-28 < y < 3.00000000000000008e-5Initial program 95.6%
associate-*l/96.2%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around inf 81.8%
*-commutative81.8%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in x around 0 32.1%
associate-*r/32.1%
neg-mul-132.1%
distribute-rgt-neg-in32.1%
associate-*l/34.9%
*-commutative34.9%
distribute-lft-neg-out34.9%
distribute-rgt-neg-in34.9%
distribute-neg-frac234.9%
Simplified34.9%
clear-num34.9%
un-div-inv34.9%
add-sqr-sqrt19.2%
sqrt-unprod29.5%
sqr-neg29.5%
sqrt-unprod9.2%
add-sqr-sqrt24.2%
Applied egg-rr24.2%
associate-/r/23.5%
/-rgt-identity23.5%
times-frac23.6%
*-rgt-identity23.6%
associate-*r/25.5%
Simplified25.5%
Taylor expanded in y around 0 23.6%
associate-/l*23.5%
Simplified23.5%
(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 97.6%
Final simplification97.6%
(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/85.5%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in y around inf 29.7%
(FPCore (x y z t) :precision binary64 (/ t (/ (- z y) (- x y))))
double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = t / ((z - y) / (x - y))
end function
public static double code(double x, double y, double z, double t) {
return t / ((z - y) / (x - y));
}
def code(x, y, z, t): return t / ((z - y) / (x - y))
function code(x, y, z, t) return Float64(t / Float64(Float64(z - y) / Float64(x - y))) end
function tmp = code(x, y, z, t) tmp = t / ((z - y) / (x - y)); end
code[x_, y_, z_, t_] := N[(t / N[(N[(z - y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{\frac{z - y}{x - y}}
\end{array}
herbie shell --seed 2024087
(FPCore (x y z t)
:name "Numeric.Signal.Multichannel:$cput from hsignal-0.2.7.1"
:precision binary64
:alt
(/ t (/ (- z y) (- x y)))
(* (/ (- x y) (- z y)) t))