
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (* x (/ (- y z) (- t z))))
double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
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) / (t - z))
end function
public static double code(double x, double y, double z, double t) {
return x * ((y - z) / (t - z));
}
def code(x, y, z, t): return x * ((y - z) / (t - z))
function code(x, y, z, t) return Float64(x * Float64(Float64(y - z) / Float64(t - z))) end
function tmp = code(x, y, z, t) tmp = x * ((y - z) / (t - z)); end
code[x_, y_, z_, t_] := N[(x * N[(N[(y - z), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{y - z}{t - z}
\end{array}
Initial program 85.4%
associate-*r/98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- z t)))))
(if (<= z -3.6e+132)
t_1
(if (<= z -3.25e+28)
(* (/ x z) (- z y))
(if (<= z -1.5e-45)
(/ x (- 1.0 (/ t z)))
(if (<= z 6.2e-12)
(* x (/ y (- t z)))
(if (<= z 1.02e+65) t_1 (* x (+ (/ (- t y) z) 1.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -3.6e+132) {
tmp = t_1;
} else if (z <= -3.25e+28) {
tmp = (x / z) * (z - y);
} else if (z <= -1.5e-45) {
tmp = x / (1.0 - (t / z));
} else if (z <= 6.2e-12) {
tmp = x * (y / (t - z));
} else if (z <= 1.02e+65) {
tmp = t_1;
} else {
tmp = x * (((t - y) / z) + 1.0);
}
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 * (z / (z - t))
if (z <= (-3.6d+132)) then
tmp = t_1
else if (z <= (-3.25d+28)) then
tmp = (x / z) * (z - y)
else if (z <= (-1.5d-45)) then
tmp = x / (1.0d0 - (t / z))
else if (z <= 6.2d-12) then
tmp = x * (y / (t - z))
else if (z <= 1.02d+65) then
tmp = t_1
else
tmp = x * (((t - y) / z) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -3.6e+132) {
tmp = t_1;
} else if (z <= -3.25e+28) {
tmp = (x / z) * (z - y);
} else if (z <= -1.5e-45) {
tmp = x / (1.0 - (t / z));
} else if (z <= 6.2e-12) {
tmp = x * (y / (t - z));
} else if (z <= 1.02e+65) {
tmp = t_1;
} else {
tmp = x * (((t - y) / z) + 1.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / (z - t)) tmp = 0 if z <= -3.6e+132: tmp = t_1 elif z <= -3.25e+28: tmp = (x / z) * (z - y) elif z <= -1.5e-45: tmp = x / (1.0 - (t / z)) elif z <= 6.2e-12: tmp = x * (y / (t - z)) elif z <= 1.02e+65: tmp = t_1 else: tmp = x * (((t - y) / z) + 1.0) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(z - t))) tmp = 0.0 if (z <= -3.6e+132) tmp = t_1; elseif (z <= -3.25e+28) tmp = Float64(Float64(x / z) * Float64(z - y)); elseif (z <= -1.5e-45) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= 6.2e-12) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 1.02e+65) tmp = t_1; else tmp = Float64(x * Float64(Float64(Float64(t - y) / z) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / (z - t)); tmp = 0.0; if (z <= -3.6e+132) tmp = t_1; elseif (z <= -3.25e+28) tmp = (x / z) * (z - y); elseif (z <= -1.5e-45) tmp = x / (1.0 - (t / z)); elseif (z <= 6.2e-12) tmp = x * (y / (t - z)); elseif (z <= 1.02e+65) tmp = t_1; else tmp = x * (((t - y) / z) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+132], t$95$1, If[LessEqual[z, -3.25e+28], N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.5e-45], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-12], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+65], t$95$1, N[(x * N[(N[(N[(t - y), $MachinePrecision] / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{z - t}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.25 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{t - y}{z} + 1\right)\\
\end{array}
\end{array}
if z < -3.60000000000000016e132 or 6.2000000000000002e-12 < z < 1.02000000000000005e65Initial program 86.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 87.3%
associate-*r/87.3%
neg-mul-187.3%
neg-sub087.3%
associate--r-87.3%
neg-sub087.3%
Simplified87.3%
Taylor expanded in x around 0 76.8%
associate-/l*54.1%
associate-/r/87.3%
Applied egg-rr87.3%
if -3.60000000000000016e132 < z < -3.25e28Initial program 83.2%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in t around 0 76.7%
associate-*r/76.7%
neg-mul-176.7%
Simplified76.7%
if -3.25e28 < z < -1.50000000000000005e-45Initial program 94.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 77.8%
associate-*r/77.8%
neg-mul-177.8%
neg-sub077.8%
associate--r-77.8%
neg-sub077.8%
Simplified77.8%
Taylor expanded in t around 0 77.8%
mul-1-neg77.8%
unsub-neg77.8%
Simplified77.8%
if -1.50000000000000005e-45 < z < 6.2000000000000002e-12Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in y around inf 86.6%
if 1.02000000000000005e65 < z Initial program 65.8%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 83.0%
+-commutative83.0%
associate--l+83.0%
associate-*r/83.0%
associate-*r/83.0%
div-sub83.0%
distribute-lft-out--83.0%
associate-*r/83.0%
mul-1-neg83.0%
unsub-neg83.0%
Simplified83.0%
Final simplification84.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- z t)))))
(if (<= z -3.5e+132)
t_1
(if (<= z -1.22e+29)
(* (/ x z) (- z y))
(if (<= z -7e-45)
(/ x (- 1.0 (/ t z)))
(if (<= z 5.6e-11)
(* x (/ y (- t z)))
(if (<= z 4.4e+64) t_1 (/ x (/ (- z) (- y z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -3.5e+132) {
tmp = t_1;
} else if (z <= -1.22e+29) {
tmp = (x / z) * (z - y);
} else if (z <= -7e-45) {
tmp = x / (1.0 - (t / z));
} else if (z <= 5.6e-11) {
tmp = x * (y / (t - z));
} else if (z <= 4.4e+64) {
tmp = t_1;
} else {
tmp = x / (-z / (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) :: t_1
real(8) :: tmp
t_1 = x * (z / (z - t))
if (z <= (-3.5d+132)) then
tmp = t_1
else if (z <= (-1.22d+29)) then
tmp = (x / z) * (z - y)
else if (z <= (-7d-45)) then
tmp = x / (1.0d0 - (t / z))
else if (z <= 5.6d-11) then
tmp = x * (y / (t - z))
else if (z <= 4.4d+64) then
tmp = t_1
else
tmp = x / (-z / (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -3.5e+132) {
tmp = t_1;
} else if (z <= -1.22e+29) {
tmp = (x / z) * (z - y);
} else if (z <= -7e-45) {
tmp = x / (1.0 - (t / z));
} else if (z <= 5.6e-11) {
tmp = x * (y / (t - z));
} else if (z <= 4.4e+64) {
tmp = t_1;
} else {
tmp = x / (-z / (y - z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / (z - t)) tmp = 0 if z <= -3.5e+132: tmp = t_1 elif z <= -1.22e+29: tmp = (x / z) * (z - y) elif z <= -7e-45: tmp = x / (1.0 - (t / z)) elif z <= 5.6e-11: tmp = x * (y / (t - z)) elif z <= 4.4e+64: tmp = t_1 else: tmp = x / (-z / (y - z)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(z - t))) tmp = 0.0 if (z <= -3.5e+132) tmp = t_1; elseif (z <= -1.22e+29) tmp = Float64(Float64(x / z) * Float64(z - y)); elseif (z <= -7e-45) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= 5.6e-11) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 4.4e+64) tmp = t_1; else tmp = Float64(x / Float64(Float64(-z) / Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / (z - t)); tmp = 0.0; if (z <= -3.5e+132) tmp = t_1; elseif (z <= -1.22e+29) tmp = (x / z) * (z - y); elseif (z <= -7e-45) tmp = x / (1.0 - (t / z)); elseif (z <= 5.6e-11) tmp = x * (y / (t - z)); elseif (z <= 4.4e+64) tmp = t_1; else tmp = x / (-z / (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+132], t$95$1, If[LessEqual[z, -1.22e+29], N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-45], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-11], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+64], t$95$1, N[(x / N[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{z - t}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.22 \cdot 10^{+29}:\\
\;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{-z}{y - z}}\\
\end{array}
\end{array}
if z < -3.5000000000000002e132 or 5.6e-11 < z < 4.40000000000000004e64Initial program 86.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 87.3%
associate-*r/87.3%
neg-mul-187.3%
neg-sub087.3%
associate--r-87.3%
neg-sub087.3%
Simplified87.3%
Taylor expanded in x around 0 76.8%
associate-/l*54.1%
associate-/r/87.3%
Applied egg-rr87.3%
if -3.5000000000000002e132 < z < -1.22e29Initial program 83.2%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in t around 0 76.7%
associate-*r/76.7%
neg-mul-176.7%
Simplified76.7%
if -1.22e29 < z < -7e-45Initial program 94.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 77.8%
associate-*r/77.8%
neg-mul-177.8%
neg-sub077.8%
associate--r-77.8%
neg-sub077.8%
Simplified77.8%
Taylor expanded in t around 0 77.8%
mul-1-neg77.8%
unsub-neg77.8%
Simplified77.8%
if -7e-45 < z < 5.6e-11Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in y around inf 86.6%
if 4.40000000000000004e64 < z Initial program 65.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around 0 82.8%
neg-mul-182.8%
distribute-neg-frac82.8%
Simplified82.8%
Final simplification84.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- z t)))))
(if (<= z -1.02e+133)
t_1
(if (<= z -4.6e+24)
(* (/ x z) (- z y))
(if (<= z -6.4e-48)
(/ x (- 1.0 (/ t z)))
(if (<= z 9e-12)
(* x (/ y (- t z)))
(if (<= z 1.86e+65) t_1 (- x (* y (/ x z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -1.02e+133) {
tmp = t_1;
} else if (z <= -4.6e+24) {
tmp = (x / z) * (z - y);
} else if (z <= -6.4e-48) {
tmp = x / (1.0 - (t / z));
} else if (z <= 9e-12) {
tmp = x * (y / (t - z));
} else if (z <= 1.86e+65) {
tmp = t_1;
} else {
tmp = x - (y * (x / 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) :: t_1
real(8) :: tmp
t_1 = x * (z / (z - t))
if (z <= (-1.02d+133)) then
tmp = t_1
else if (z <= (-4.6d+24)) then
tmp = (x / z) * (z - y)
else if (z <= (-6.4d-48)) then
tmp = x / (1.0d0 - (t / z))
else if (z <= 9d-12) then
tmp = x * (y / (t - z))
else if (z <= 1.86d+65) then
tmp = t_1
else
tmp = x - (y * (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -1.02e+133) {
tmp = t_1;
} else if (z <= -4.6e+24) {
tmp = (x / z) * (z - y);
} else if (z <= -6.4e-48) {
tmp = x / (1.0 - (t / z));
} else if (z <= 9e-12) {
tmp = x * (y / (t - z));
} else if (z <= 1.86e+65) {
tmp = t_1;
} else {
tmp = x - (y * (x / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / (z - t)) tmp = 0 if z <= -1.02e+133: tmp = t_1 elif z <= -4.6e+24: tmp = (x / z) * (z - y) elif z <= -6.4e-48: tmp = x / (1.0 - (t / z)) elif z <= 9e-12: tmp = x * (y / (t - z)) elif z <= 1.86e+65: tmp = t_1 else: tmp = x - (y * (x / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(z - t))) tmp = 0.0 if (z <= -1.02e+133) tmp = t_1; elseif (z <= -4.6e+24) tmp = Float64(Float64(x / z) * Float64(z - y)); elseif (z <= -6.4e-48) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= 9e-12) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 1.86e+65) tmp = t_1; else tmp = Float64(x - Float64(y * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / (z - t)); tmp = 0.0; if (z <= -1.02e+133) tmp = t_1; elseif (z <= -4.6e+24) tmp = (x / z) * (z - y); elseif (z <= -6.4e-48) tmp = x / (1.0 - (t / z)); elseif (z <= 9e-12) tmp = x * (y / (t - z)); elseif (z <= 1.86e+65) tmp = t_1; else tmp = x - (y * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+133], t$95$1, If[LessEqual[z, -4.6e+24], N[(N[(x / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.4e-48], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e-12], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.86e+65], t$95$1, N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{z - t}\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+133}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-48}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 1.86 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -1.02e133 or 8.99999999999999962e-12 < z < 1.8599999999999999e65Initial program 86.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 87.3%
associate-*r/87.3%
neg-mul-187.3%
neg-sub087.3%
associate--r-87.3%
neg-sub087.3%
Simplified87.3%
Taylor expanded in x around 0 76.8%
associate-/l*54.1%
associate-/r/87.3%
Applied egg-rr87.3%
if -1.02e133 < z < -4.5999999999999998e24Initial program 83.2%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in t around 0 76.7%
associate-*r/76.7%
neg-mul-176.7%
Simplified76.7%
if -4.5999999999999998e24 < z < -6.39999999999999959e-48Initial program 94.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 77.8%
associate-*r/77.8%
neg-mul-177.8%
neg-sub077.8%
associate--r-77.8%
neg-sub077.8%
Simplified77.8%
Taylor expanded in t around 0 77.8%
mul-1-neg77.8%
unsub-neg77.8%
Simplified77.8%
if -6.39999999999999959e-48 < z < 8.99999999999999962e-12Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in y around inf 86.6%
if 1.8599999999999999e65 < z Initial program 65.8%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in t around 0 56.8%
associate-*r/56.8%
neg-mul-156.8%
Simplified56.8%
Taylor expanded in z around 0 76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
associate-*r/76.8%
Simplified76.8%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.2e+19)
x
(if (<= z -1.05e-41)
(* (- z) (/ x t))
(if (<= z 5.5e-13)
(* x (/ y t))
(if (<= z 2.8e+38) x (if (<= z 1.8e+112) (* x (/ (- y) z)) x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.2e+19) {
tmp = x;
} else if (z <= -1.05e-41) {
tmp = -z * (x / t);
} else if (z <= 5.5e-13) {
tmp = x * (y / t);
} else if (z <= 2.8e+38) {
tmp = x;
} else if (z <= 1.8e+112) {
tmp = x * (-y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.2d+19)) then
tmp = x
else if (z <= (-1.05d-41)) then
tmp = -z * (x / t)
else if (z <= 5.5d-13) then
tmp = x * (y / t)
else if (z <= 2.8d+38) then
tmp = x
else if (z <= 1.8d+112) then
tmp = x * (-y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.2e+19) {
tmp = x;
} else if (z <= -1.05e-41) {
tmp = -z * (x / t);
} else if (z <= 5.5e-13) {
tmp = x * (y / t);
} else if (z <= 2.8e+38) {
tmp = x;
} else if (z <= 1.8e+112) {
tmp = x * (-y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.2e+19: tmp = x elif z <= -1.05e-41: tmp = -z * (x / t) elif z <= 5.5e-13: tmp = x * (y / t) elif z <= 2.8e+38: tmp = x elif z <= 1.8e+112: tmp = x * (-y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.2e+19) tmp = x; elseif (z <= -1.05e-41) tmp = Float64(Float64(-z) * Float64(x / t)); elseif (z <= 5.5e-13) tmp = Float64(x * Float64(y / t)); elseif (z <= 2.8e+38) tmp = x; elseif (z <= 1.8e+112) tmp = Float64(x * Float64(Float64(-y) / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.2e+19) tmp = x; elseif (z <= -1.05e-41) tmp = -z * (x / t); elseif (z <= 5.5e-13) tmp = x * (y / t); elseif (z <= 2.8e+38) tmp = x; elseif (z <= 1.8e+112) tmp = x * (-y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.2e+19], x, If[LessEqual[z, -1.05e-41], N[((-z) * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-13], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+38], x, If[LessEqual[z, 1.8e+112], N[(x * N[((-y) / z), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+19}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-41}:\\
\;\;\;\;\left(-z\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2e19 or 5.49999999999999979e-13 < z < 2.8e38 or 1.8e112 < z Initial program 77.8%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 62.7%
if -1.2e19 < z < -1.05000000000000006e-41Initial program 92.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 78.2%
associate-*r/78.2%
neg-mul-178.2%
neg-sub078.2%
associate--r-78.2%
neg-sub078.2%
Simplified78.2%
Taylor expanded in t around inf 70.5%
mul-1-neg70.5%
associate-*r/70.4%
distribute-rgt-neg-in70.4%
Simplified70.4%
if -1.05000000000000006e-41 < z < 5.49999999999999979e-13Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in z around 0 74.1%
if 2.8e38 < z < 1.8e112Initial program 83.2%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around inf 60.9%
Taylor expanded in t around 0 49.6%
associate-*r/49.6%
neg-mul-149.6%
Simplified49.6%
Final simplification67.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.08e+21)
x
(if (<= z -1.05e-41)
(/ (* x (- z)) t)
(if (<= z 4.45e-13)
(* x (/ y t))
(if (<= z 2.95e+38) x (if (<= z 1.7e+112) (* x (/ (- y) z)) x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.08e+21) {
tmp = x;
} else if (z <= -1.05e-41) {
tmp = (x * -z) / t;
} else if (z <= 4.45e-13) {
tmp = x * (y / t);
} else if (z <= 2.95e+38) {
tmp = x;
} else if (z <= 1.7e+112) {
tmp = x * (-y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.08d+21)) then
tmp = x
else if (z <= (-1.05d-41)) then
tmp = (x * -z) / t
else if (z <= 4.45d-13) then
tmp = x * (y / t)
else if (z <= 2.95d+38) then
tmp = x
else if (z <= 1.7d+112) then
tmp = x * (-y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.08e+21) {
tmp = x;
} else if (z <= -1.05e-41) {
tmp = (x * -z) / t;
} else if (z <= 4.45e-13) {
tmp = x * (y / t);
} else if (z <= 2.95e+38) {
tmp = x;
} else if (z <= 1.7e+112) {
tmp = x * (-y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.08e+21: tmp = x elif z <= -1.05e-41: tmp = (x * -z) / t elif z <= 4.45e-13: tmp = x * (y / t) elif z <= 2.95e+38: tmp = x elif z <= 1.7e+112: tmp = x * (-y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.08e+21) tmp = x; elseif (z <= -1.05e-41) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (z <= 4.45e-13) tmp = Float64(x * Float64(y / t)); elseif (z <= 2.95e+38) tmp = x; elseif (z <= 1.7e+112) tmp = Float64(x * Float64(Float64(-y) / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.08e+21) tmp = x; elseif (z <= -1.05e-41) tmp = (x * -z) / t; elseif (z <= 4.45e-13) tmp = x * (y / t); elseif (z <= 2.95e+38) tmp = x; elseif (z <= 1.7e+112) tmp = x * (-y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.08e+21], x, If[LessEqual[z, -1.05e-41], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 4.45e-13], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.95e+38], x, If[LessEqual[z, 1.7e+112], N[(x * N[((-y) / z), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{+21}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-41}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 4.45 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.08e21 or 4.4500000000000002e-13 < z < 2.94999999999999991e38 or 1.69999999999999997e112 < z Initial program 77.8%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 62.7%
if -1.08e21 < z < -1.05000000000000006e-41Initial program 92.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 78.2%
associate-*r/78.2%
neg-mul-178.2%
neg-sub078.2%
associate--r-78.2%
neg-sub078.2%
Simplified78.2%
Taylor expanded in t around 0 78.2%
mul-1-neg78.2%
unsub-neg78.2%
Simplified78.2%
Taylor expanded in t around inf 70.5%
associate-*r/70.5%
*-commutative70.5%
neg-mul-170.5%
distribute-rgt-neg-in70.5%
Simplified70.5%
if -1.05000000000000006e-41 < z < 4.4500000000000002e-13Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in z around 0 74.1%
if 2.94999999999999991e38 < z < 1.69999999999999997e112Initial program 83.2%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around inf 60.9%
Taylor expanded in t around 0 49.6%
associate-*r/49.6%
neg-mul-149.6%
Simplified49.6%
Final simplification67.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -5.2e+54)
x
(if (or (<= z 1.7e-9) (and (not (<= z 4.2e+34)) (<= z 7.2e+129)))
(* x (/ y (- t z)))
x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.2e+54) {
tmp = x;
} else if ((z <= 1.7e-9) || (!(z <= 4.2e+34) && (z <= 7.2e+129))) {
tmp = x * (y / (t - z));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-5.2d+54)) then
tmp = x
else if ((z <= 1.7d-9) .or. (.not. (z <= 4.2d+34)) .and. (z <= 7.2d+129)) then
tmp = x * (y / (t - z))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.2e+54) {
tmp = x;
} else if ((z <= 1.7e-9) || (!(z <= 4.2e+34) && (z <= 7.2e+129))) {
tmp = x * (y / (t - z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.2e+54: tmp = x elif (z <= 1.7e-9) or (not (z <= 4.2e+34) and (z <= 7.2e+129)): tmp = x * (y / (t - z)) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.2e+54) tmp = x; elseif ((z <= 1.7e-9) || (!(z <= 4.2e+34) && (z <= 7.2e+129))) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.2e+54) tmp = x; elseif ((z <= 1.7e-9) || (~((z <= 4.2e+34)) && (z <= 7.2e+129))) tmp = x * (y / (t - z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.2e+54], x, If[Or[LessEqual[z, 1.7e-9], And[N[Not[LessEqual[z, 4.2e+34]], $MachinePrecision], LessEqual[z, 7.2e+129]]], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-9} \lor \neg \left(z \leq 4.2 \cdot 10^{+34}\right) \land z \leq 7.2 \cdot 10^{+129}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -5.20000000000000013e54 or 1.6999999999999999e-9 < z < 4.20000000000000035e34 or 7.2000000000000002e129 < z Initial program 77.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 66.8%
if -5.20000000000000013e54 < z < 1.6999999999999999e-9 or 4.20000000000000035e34 < z < 7.2000000000000002e129Initial program 90.6%
associate-*r/97.9%
Simplified97.9%
Taylor expanded in y around inf 77.7%
Final simplification73.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.82e+21)
x
(if (<= z 2.4e-14)
(* x (/ y t))
(if (<= z 6.2e+39) x (if (<= z 1.95e+112) (* x (/ (- y) z)) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.82e+21) {
tmp = x;
} else if (z <= 2.4e-14) {
tmp = x * (y / t);
} else if (z <= 6.2e+39) {
tmp = x;
} else if (z <= 1.95e+112) {
tmp = x * (-y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.82d+21)) then
tmp = x
else if (z <= 2.4d-14) then
tmp = x * (y / t)
else if (z <= 6.2d+39) then
tmp = x
else if (z <= 1.95d+112) then
tmp = x * (-y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.82e+21) {
tmp = x;
} else if (z <= 2.4e-14) {
tmp = x * (y / t);
} else if (z <= 6.2e+39) {
tmp = x;
} else if (z <= 1.95e+112) {
tmp = x * (-y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.82e+21: tmp = x elif z <= 2.4e-14: tmp = x * (y / t) elif z <= 6.2e+39: tmp = x elif z <= 1.95e+112: tmp = x * (-y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.82e+21) tmp = x; elseif (z <= 2.4e-14) tmp = Float64(x * Float64(y / t)); elseif (z <= 6.2e+39) tmp = x; elseif (z <= 1.95e+112) tmp = Float64(x * Float64(Float64(-y) / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.82e+21) tmp = x; elseif (z <= 2.4e-14) tmp = x * (y / t); elseif (z <= 6.2e+39) tmp = x; elseif (z <= 1.95e+112) tmp = x * (-y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.82e+21], x, If[LessEqual[z, 2.4e-14], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+39], x, If[LessEqual[z, 1.95e+112], N[(x * N[((-y) / z), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.82 \cdot 10^{+21}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.82e21 or 2.4e-14 < z < 6.2000000000000005e39 or 1.94999999999999984e112 < z Initial program 77.8%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 62.7%
if -1.82e21 < z < 2.4e-14Initial program 92.8%
associate-*r/97.5%
Simplified97.5%
Taylor expanded in z around 0 70.1%
if 6.2000000000000005e39 < z < 1.94999999999999984e112Initial program 83.2%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in y around inf 60.9%
Taylor expanded in t around 0 49.6%
associate-*r/49.6%
neg-mul-149.6%
Simplified49.6%
Final simplification65.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- z t)))))
(if (<= z -1.22e-46)
t_1
(if (<= z 4.7e-11)
(* x (/ y (- t z)))
(if (<= z 4e+67) t_1 (- x (* y (/ x z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -1.22e-46) {
tmp = t_1;
} else if (z <= 4.7e-11) {
tmp = x * (y / (t - z));
} else if (z <= 4e+67) {
tmp = t_1;
} else {
tmp = x - (y * (x / 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) :: t_1
real(8) :: tmp
t_1 = x * (z / (z - t))
if (z <= (-1.22d-46)) then
tmp = t_1
else if (z <= 4.7d-11) then
tmp = x * (y / (t - z))
else if (z <= 4d+67) then
tmp = t_1
else
tmp = x - (y * (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (z / (z - t));
double tmp;
if (z <= -1.22e-46) {
tmp = t_1;
} else if (z <= 4.7e-11) {
tmp = x * (y / (t - z));
} else if (z <= 4e+67) {
tmp = t_1;
} else {
tmp = x - (y * (x / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / (z - t)) tmp = 0 if z <= -1.22e-46: tmp = t_1 elif z <= 4.7e-11: tmp = x * (y / (t - z)) elif z <= 4e+67: tmp = t_1 else: tmp = x - (y * (x / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(z - t))) tmp = 0.0 if (z <= -1.22e-46) tmp = t_1; elseif (z <= 4.7e-11) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 4e+67) tmp = t_1; else tmp = Float64(x - Float64(y * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / (z - t)); tmp = 0.0; if (z <= -1.22e-46) tmp = t_1; elseif (z <= 4.7e-11) tmp = x * (y / (t - z)); elseif (z <= 4e+67) tmp = t_1; else tmp = x - (y * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.22e-46], t$95$1, If[LessEqual[z, 4.7e-11], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+67], t$95$1, N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{z - t}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -1.22e-46 or 4.69999999999999993e-11 < z < 3.99999999999999993e67Initial program 86.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 78.6%
associate-*r/78.6%
neg-mul-178.6%
neg-sub078.6%
associate--r-78.6%
neg-sub078.6%
Simplified78.6%
Taylor expanded in x around 0 70.0%
associate-/l*59.5%
associate-/r/78.6%
Applied egg-rr78.6%
if -1.22e-46 < z < 4.69999999999999993e-11Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in y around inf 86.6%
if 3.99999999999999993e67 < z Initial program 65.8%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in t around 0 56.8%
associate-*r/56.8%
neg-mul-156.8%
Simplified56.8%
Taylor expanded in z around 0 76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
associate-*r/76.8%
Simplified76.8%
Final simplification81.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -5e-46)
(/ x (- 1.0 (/ t z)))
(if (<= z 2.65e-11)
(* x (/ y (- t z)))
(if (<= z 1.3e+67) (* x (/ z (- z t))) (- x (* y (/ x z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e-46) {
tmp = x / (1.0 - (t / z));
} else if (z <= 2.65e-11) {
tmp = x * (y / (t - z));
} else if (z <= 1.3e+67) {
tmp = x * (z / (z - t));
} else {
tmp = x - (y * (x / 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 <= (-5d-46)) then
tmp = x / (1.0d0 - (t / z))
else if (z <= 2.65d-11) then
tmp = x * (y / (t - z))
else if (z <= 1.3d+67) then
tmp = x * (z / (z - t))
else
tmp = x - (y * (x / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e-46) {
tmp = x / (1.0 - (t / z));
} else if (z <= 2.65e-11) {
tmp = x * (y / (t - z));
} else if (z <= 1.3e+67) {
tmp = x * (z / (z - t));
} else {
tmp = x - (y * (x / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5e-46: tmp = x / (1.0 - (t / z)) elif z <= 2.65e-11: tmp = x * (y / (t - z)) elif z <= 1.3e+67: tmp = x * (z / (z - t)) else: tmp = x - (y * (x / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5e-46) tmp = Float64(x / Float64(1.0 - Float64(t / z))); elseif (z <= 2.65e-11) tmp = Float64(x * Float64(y / Float64(t - z))); elseif (z <= 1.3e+67) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(x - Float64(y * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5e-46) tmp = x / (1.0 - (t / z)); elseif (z <= 2.65e-11) tmp = x * (y / (t - z)); elseif (z <= 1.3e+67) tmp = x * (z / (z - t)); else tmp = x - (y * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e-46], N[(x / N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.65e-11], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+67], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{1 - \frac{t}{z}}\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-11}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+67}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -4.99999999999999992e-46Initial program 84.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 78.1%
associate-*r/78.1%
neg-mul-178.1%
neg-sub078.1%
associate--r-78.1%
neg-sub078.1%
Simplified78.1%
Taylor expanded in t around 0 78.1%
mul-1-neg78.1%
unsub-neg78.1%
Simplified78.1%
if -4.99999999999999992e-46 < z < 2.6499999999999999e-11Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in y around inf 86.6%
if 2.6499999999999999e-11 < z < 1.3e67Initial program 95.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 80.6%
associate-*r/80.6%
neg-mul-180.6%
neg-sub080.6%
associate--r-80.6%
neg-sub080.6%
Simplified80.6%
Taylor expanded in x around 0 80.4%
associate-/l*76.1%
associate-/r/80.6%
Applied egg-rr80.6%
if 1.3e67 < z Initial program 65.8%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in t around 0 56.8%
associate-*r/56.8%
neg-mul-156.8%
Simplified56.8%
Taylor expanded in z around 0 76.4%
+-commutative76.4%
mul-1-neg76.4%
unsub-neg76.4%
associate-*r/76.8%
Simplified76.8%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.3e-45) (not (<= z 5.8e-11))) (* x (/ z (- z t))) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3e-45) || !(z <= 5.8e-11)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / (t - 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 <= (-1.3d-45)) .or. (.not. (z <= 5.8d-11))) then
tmp = x * (z / (z - t))
else
tmp = x * (y / (t - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.3e-45) || !(z <= 5.8e-11)) {
tmp = x * (z / (z - t));
} else {
tmp = x * (y / (t - z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.3e-45) or not (z <= 5.8e-11): tmp = x * (z / (z - t)) else: tmp = x * (y / (t - z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.3e-45) || !(z <= 5.8e-11)) tmp = Float64(x * Float64(z / Float64(z - t))); else tmp = Float64(x * Float64(y / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.3e-45) || ~((z <= 5.8e-11))) tmp = x * (z / (z - t)); else tmp = x * (y / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.3e-45], N[Not[LessEqual[z, 5.8e-11]], $MachinePrecision]], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-45} \lor \neg \left(z \leq 5.8 \cdot 10^{-11}\right):\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\end{array}
\end{array}
if z < -1.29999999999999993e-45 or 5.8e-11 < z Initial program 79.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 75.0%
associate-*r/75.0%
neg-mul-175.0%
neg-sub075.0%
associate--r-75.0%
neg-sub075.0%
Simplified75.0%
Taylor expanded in x around 0 62.6%
associate-/l*54.2%
associate-/r/75.0%
Applied egg-rr75.0%
if -1.29999999999999993e-45 < z < 5.8e-11Initial program 92.8%
associate-*r/97.2%
Simplified97.2%
Taylor expanded in y around inf 86.6%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (<= z -1.28e+20) x (if (<= z 2e-14) (* x (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.28e+20) {
tmp = x;
} else if (z <= 2e-14) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.28d+20)) then
tmp = x
else if (z <= 2d-14) then
tmp = x * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.28e+20) {
tmp = x;
} else if (z <= 2e-14) {
tmp = x * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.28e+20: tmp = x elif z <= 2e-14: tmp = x * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.28e+20) tmp = x; elseif (z <= 2e-14) tmp = Float64(x * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.28e+20) tmp = x; elseif (z <= 2e-14) tmp = x * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.28e+20], x, If[LessEqual[z, 2e-14], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-14}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.28e20 or 2e-14 < z Initial program 78.5%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in z around inf 57.6%
if -1.28e20 < z < 2e-14Initial program 92.8%
associate-*r/97.5%
Simplified97.5%
Taylor expanded in z around 0 70.1%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 85.4%
associate-*r/98.7%
Simplified98.7%
Taylor expanded in z around inf 34.6%
Final simplification34.6%
(FPCore (x y z t) :precision binary64 (/ x (/ (- t z) (- y z))))
double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
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 / ((t - z) / (y - z))
end function
public static double code(double x, double y, double z, double t) {
return x / ((t - z) / (y - z));
}
def code(x, y, z, t): return x / ((t - z) / (y - z))
function code(x, y, z, t) return Float64(x / Float64(Float64(t - z) / Float64(y - z))) end
function tmp = code(x, y, z, t) tmp = x / ((t - z) / (y - z)); end
code[x_, y_, z_, t_] := N[(x / N[(N[(t - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{\frac{t - z}{y - z}}
\end{array}
herbie shell --seed 2023195
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
:herbie-target
(/ x (/ (- t z) (- y z)))
(/ (* x (- y z)) (- t z)))