
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ (- y a) z) (- x t)))))
(if (<= z -1.9e+162)
t_1
(if (<= z 3.8e+149) (+ x (/ (- t x) (/ (- a z) (- y z)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((y - a) / z) * (x - t));
double tmp;
if (z <= -1.9e+162) {
tmp = t_1;
} else if (z <= 3.8e+149) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (((y - a) / z) * (x - t))
if (z <= (-1.9d+162)) then
tmp = t_1
else if (z <= 3.8d+149) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((y - a) / z) * (x - t));
double tmp;
if (z <= -1.9e+162) {
tmp = t_1;
} else if (z <= 3.8e+149) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((y - a) / z) * (x - t)) tmp = 0 if z <= -1.9e+162: tmp = t_1 elif z <= 3.8e+149: tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(y - a) / z) * Float64(x - t))) tmp = 0.0 if (z <= -1.9e+162) tmp = t_1; elseif (z <= 3.8e+149) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((y - a) / z) * (x - t)); tmp = 0.0; if (z <= -1.9e+162) tmp = t_1; elseif (z <= 3.8e+149) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+162], t$95$1, If[LessEqual[z, 3.8e+149], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y - a}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+149}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.90000000000000012e162 or 3.8000000000000001e149 < z Initial program 22.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6468.3%
Simplified68.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6487.4%
Applied egg-rr87.4%
if -1.90000000000000012e162 < z < 3.8000000000000001e149Initial program 81.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.1%
Applied egg-rr93.1%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.4%
Applied egg-rr93.4%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ a (- y z))))))
(if (<= a -4.5e+62)
t_1
(if (<= a -1.45e-37)
(* t (/ (- y z) (- a z)))
(if (<= a 3.45e+59) (+ t (* (/ (- y a) z) (- x t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / (y - z)));
double tmp;
if (a <= -4.5e+62) {
tmp = t_1;
} else if (a <= -1.45e-37) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 3.45e+59) {
tmp = t + (((y - a) / z) * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t - x) / (a / (y - z)))
if (a <= (-4.5d+62)) then
tmp = t_1
else if (a <= (-1.45d-37)) then
tmp = t * ((y - z) / (a - z))
else if (a <= 3.45d+59) then
tmp = t + (((y - a) / z) * (x - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / (y - z)));
double tmp;
if (a <= -4.5e+62) {
tmp = t_1;
} else if (a <= -1.45e-37) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 3.45e+59) {
tmp = t + (((y - a) / z) * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / (a / (y - z))) tmp = 0 if a <= -4.5e+62: tmp = t_1 elif a <= -1.45e-37: tmp = t * ((y - z) / (a - z)) elif a <= 3.45e+59: tmp = t + (((y - a) / z) * (x - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))) tmp = 0.0 if (a <= -4.5e+62) tmp = t_1; elseif (a <= -1.45e-37) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 3.45e+59) tmp = Float64(t + Float64(Float64(Float64(y - a) / z) * Float64(x - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / (a / (y - z))); tmp = 0.0; if (a <= -4.5e+62) tmp = t_1; elseif (a <= -1.45e-37) tmp = t * ((y - z) / (a - z)); elseif (a <= 3.45e+59) tmp = t + (((y - a) / z) * (x - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.5e+62], t$95$1, If[LessEqual[a, -1.45e-37], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.45e+59], N[(t + N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{if}\;a \leq -4.5 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-37}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 3.45 \cdot 10^{+59}:\\
\;\;\;\;t + \frac{y - a}{z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.49999999999999999e62 or 3.4499999999999999e59 < a Initial program 65.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.7%
Applied egg-rr91.7%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.7%
Applied egg-rr91.7%
Taylor expanded in a around inf
/-lowering-/.f64N/A
--lowering--.f6481.0%
Simplified81.0%
if -4.49999999999999999e62 < a < -1.45000000000000002e-37Initial program 78.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6465.3%
Simplified65.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6478.5%
Applied egg-rr78.5%
if -1.45000000000000002e-37 < a < 3.4499999999999999e59Initial program 64.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6476.3%
Simplified76.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6483.7%
Applied egg-rr83.7%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.5e-58)
(* t (/ (- y z) (- a z)))
(if (<= z 1.05e-8)
(+ x (* (- t x) (/ y a)))
(if (<= z 9e+190) (+ t (* y (/ (- x t) z))) (+ t (* a (/ (- t x) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-58) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.05e-8) {
tmp = x + ((t - x) * (y / a));
} else if (z <= 9e+190) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = t + (a * ((t - x) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.5d-58)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 1.05d-8) then
tmp = x + ((t - x) * (y / a))
else if (z <= 9d+190) then
tmp = t + (y * ((x - t) / z))
else
tmp = t + (a * ((t - x) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e-58) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.05e-8) {
tmp = x + ((t - x) * (y / a));
} else if (z <= 9e+190) {
tmp = t + (y * ((x - t) / z));
} else {
tmp = t + (a * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e-58: tmp = t * ((y - z) / (a - z)) elif z <= 1.05e-8: tmp = x + ((t - x) * (y / a)) elif z <= 9e+190: tmp = t + (y * ((x - t) / z)) else: tmp = t + (a * ((t - x) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e-58) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 1.05e-8) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); elseif (z <= 9e+190) tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z))); else tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e-58) tmp = t * ((y - z) / (a - z)); elseif (z <= 1.05e-8) tmp = x + ((t - x) * (y / a)); elseif (z <= 9e+190) tmp = t + (y * ((x - t) / z)); else tmp = t + (a * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e-58], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-8], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+190], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-58}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-8}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+190}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if z < -8.5000000000000004e-58Initial program 50.4%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6447.5%
Simplified47.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6473.4%
Applied egg-rr73.4%
if -8.5000000000000004e-58 < z < 1.04999999999999997e-8Initial program 93.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.9%
Applied egg-rr97.9%
Taylor expanded in z around 0
/-lowering-/.f6479.7%
Simplified79.7%
if 1.04999999999999997e-8 < z < 8.9999999999999999e190Initial program 59.8%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6464.1%
Simplified64.1%
Taylor expanded in a around 0
--lowering--.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6470.7%
Simplified70.7%
if 8.9999999999999999e190 < z Initial program 13.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6469.3%
Simplified69.3%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.7%
Simplified84.7%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.4e-59)
t_1
(if (<= z 0.026)
(+ x (* (- t x) (/ y a)))
(if (<= z 9.5e+221) t_1 (+ t (* a (/ (- t x) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.4e-59) {
tmp = t_1;
} else if (z <= 0.026) {
tmp = x + ((t - x) * (y / a));
} else if (z <= 9.5e+221) {
tmp = t_1;
} else {
tmp = t + (a * ((t - x) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (z <= (-1.4d-59)) then
tmp = t_1
else if (z <= 0.026d0) then
tmp = x + ((t - x) * (y / a))
else if (z <= 9.5d+221) then
tmp = t_1
else
tmp = t + (a * ((t - x) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.4e-59) {
tmp = t_1;
} else if (z <= 0.026) {
tmp = x + ((t - x) * (y / a));
} else if (z <= 9.5e+221) {
tmp = t_1;
} else {
tmp = t + (a * ((t - x) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.4e-59: tmp = t_1 elif z <= 0.026: tmp = x + ((t - x) * (y / a)) elif z <= 9.5e+221: tmp = t_1 else: tmp = t + (a * ((t - x) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.4e-59) tmp = t_1; elseif (z <= 0.026) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); elseif (z <= 9.5e+221) tmp = t_1; else tmp = Float64(t + Float64(a * Float64(Float64(t - x) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.4e-59) tmp = t_1; elseif (z <= 0.026) tmp = x + ((t - x) * (y / a)); elseif (z <= 9.5e+221) tmp = t_1; else tmp = t + (a * ((t - x) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e-59], t$95$1, If[LessEqual[z, 0.026], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+221], t$95$1, N[(t + N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.026:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+221}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + a \cdot \frac{t - x}{z}\\
\end{array}
\end{array}
if z < -1.3999999999999999e-59 or 0.0259999999999999988 < z < 9.50000000000000044e221Initial program 51.0%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6447.0%
Simplified47.0%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6469.0%
Applied egg-rr69.0%
if -1.3999999999999999e-59 < z < 0.0259999999999999988Initial program 93.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.9%
Applied egg-rr97.9%
Taylor expanded in z around 0
/-lowering-/.f6479.9%
Simplified79.9%
if 9.50000000000000044e221 < z Initial program 8.9%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6474.0%
Simplified74.0%
Taylor expanded in y around 0
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-lowering-+.f64N/A
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6494.6%
Simplified94.6%
Final simplification75.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ (- y a) z) (- x t)))))
(if (<= z -8e+161)
t_1
(if (<= z 1.7e+150) (+ x (* (- t x) (/ (- y z) (- a z)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((y - a) / z) * (x - t));
double tmp;
if (z <= -8e+161) {
tmp = t_1;
} else if (z <= 1.7e+150) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t + (((y - a) / z) * (x - t))
if (z <= (-8d+161)) then
tmp = t_1
else if (z <= 1.7d+150) then
tmp = x + ((t - x) * ((y - z) / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t + (((y - a) / z) * (x - t));
double tmp;
if (z <= -8e+161) {
tmp = t_1;
} else if (z <= 1.7e+150) {
tmp = x + ((t - x) * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (((y - a) / z) * (x - t)) tmp = 0 if z <= -8e+161: tmp = t_1 elif z <= 1.7e+150: tmp = x + ((t - x) * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(Float64(y - a) / z) * Float64(x - t))) tmp = 0.0 if (z <= -8e+161) tmp = t_1; elseif (z <= 1.7e+150) tmp = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (((y - a) / z) * (x - t)); tmp = 0.0; if (z <= -8e+161) tmp = t_1; elseif (z <= 1.7e+150) tmp = x + ((t - x) * ((y - z) / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e+161], t$95$1, If[LessEqual[z, 1.7e+150], N[(x + N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y - a}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{+161}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+150}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.0000000000000003e161 or 1.69999999999999991e150 < z Initial program 22.3%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6468.3%
Simplified68.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6487.4%
Applied egg-rr87.4%
if -8.0000000000000003e161 < z < 1.69999999999999991e150Initial program 81.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.1%
Applied egg-rr93.1%
Final simplification91.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ a (- y z))))))
(if (<= a -1.85e+62)
t_1
(if (<= a 7.8e+58) (+ t (* (/ y z) (- x t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / (y - z)));
double tmp;
if (a <= -1.85e+62) {
tmp = t_1;
} else if (a <= 7.8e+58) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t - x) / (a / (y - z)))
if (a <= (-1.85d+62)) then
tmp = t_1
else if (a <= 7.8d+58) then
tmp = t + ((y / z) * (x - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / (y - z)));
double tmp;
if (a <= -1.85e+62) {
tmp = t_1;
} else if (a <= 7.8e+58) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / (a / (y - z))) tmp = 0 if a <= -1.85e+62: tmp = t_1 elif a <= 7.8e+58: tmp = t + ((y / z) * (x - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))) tmp = 0.0 if (a <= -1.85e+62) tmp = t_1; elseif (a <= 7.8e+58) tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / (a / (y - z))); tmp = 0.0; if (a <= -1.85e+62) tmp = t_1; elseif (a <= 7.8e+58) tmp = t + ((y / z) * (x - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.85e+62], t$95$1, If[LessEqual[a, 7.8e+58], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+58}:\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.85000000000000007e62 or 7.8000000000000002e58 < a Initial program 65.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.7%
Applied egg-rr91.7%
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.7%
Applied egg-rr91.7%
Taylor expanded in a around inf
/-lowering-/.f64N/A
--lowering--.f6481.0%
Simplified81.0%
if -1.85000000000000007e62 < a < 7.8000000000000002e58Initial program 66.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6473.8%
Simplified73.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6480.2%
Applied egg-rr80.2%
Taylor expanded in y around inf
/-lowering-/.f6478.3%
Simplified78.3%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) a)))))
(if (<= a -1.05e+64)
t_1
(if (<= a 1.15e+59) (+ t (* (/ y z) (- x t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -1.05e+64) {
tmp = t_1;
} else if (a <= 1.15e+59) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / a))
if (a <= (-1.05d+64)) then
tmp = t_1
else if (a <= 1.15d+59) then
tmp = t + ((y / z) * (x - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -1.05e+64) {
tmp = t_1;
} else if (a <= 1.15e+59) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / a)) tmp = 0 if a <= -1.05e+64: tmp = t_1 elif a <= 1.15e+59: tmp = t + ((y / z) * (x - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -1.05e+64) tmp = t_1; elseif (a <= 1.15e+59) tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / a)); tmp = 0.0; if (a <= -1.05e+64) tmp = t_1; elseif (a <= 1.15e+59) tmp = t + ((y / z) * (x - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.05e+64], t$95$1, If[LessEqual[a, 1.15e+59], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{+64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+59}:\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.05e64 or 1.15000000000000004e59 < a Initial program 65.3%
Taylor expanded in a around inf
+-lowering-+.f64N/A
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f6477.0%
Simplified77.0%
if -1.05e64 < a < 1.15000000000000004e59Initial program 66.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6473.8%
Simplified73.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6480.2%
Applied egg-rr80.2%
Taylor expanded in y around inf
/-lowering-/.f6478.3%
Simplified78.3%
Final simplification77.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.4e+67) (+ x (/ (- t x) (/ a y))) (if (<= a 3.7e+59) (+ t (* (/ y z) (- x t))) (+ x (* (- t x) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e+67) {
tmp = x + ((t - x) / (a / y));
} else if (a <= 3.7e+59) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.4d+67)) then
tmp = x + ((t - x) / (a / y))
else if (a <= 3.7d+59) then
tmp = t + ((y / z) * (x - t))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.4e+67) {
tmp = x + ((t - x) / (a / y));
} else if (a <= 3.7e+59) {
tmp = t + ((y / z) * (x - t));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.4e+67: tmp = x + ((t - x) / (a / y)) elif a <= 3.7e+59: tmp = t + ((y / z) * (x - t)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.4e+67) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); elseif (a <= 3.7e+59) tmp = Float64(t + Float64(Float64(y / z) * Float64(x - t))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.4e+67) tmp = x + ((t - x) / (a / y)); elseif (a <= 3.7e+59) tmp = t + ((y / z) * (x - t)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.4e+67], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.7e+59], N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+67}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{+59}:\\
\;\;\;\;t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -3.4000000000000002e67Initial program 58.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6489.9%
Applied egg-rr89.9%
Taylor expanded in z around 0
/-lowering-/.f6478.1%
Simplified78.1%
+-commutativeN/A
+-lowering-+.f64N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f6478.2%
Applied egg-rr78.2%
if -3.4000000000000002e67 < a < 3.69999999999999997e59Initial program 66.2%
Taylor expanded in z around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
distribute-rgt-out--N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6473.8%
Simplified73.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6480.2%
Applied egg-rr80.2%
Taylor expanded in y around inf
/-lowering-/.f6478.3%
Simplified78.3%
if 3.69999999999999997e59 < a Initial program 71.0%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6493.3%
Applied egg-rr93.3%
Taylor expanded in z around 0
/-lowering-/.f6468.0%
Simplified68.0%
Final simplification76.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* t (/ (- y z) (- a z))))) (if (<= t -1.7e-171) t_1 (if (<= t 1.9e-34) (* x (- 1.0 (/ y a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (t <= -1.7e-171) {
tmp = t_1;
} else if (t <= 1.9e-34) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
if (t <= (-1.7d-171)) then
tmp = t_1
else if (t <= 1.9d-34) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (t <= -1.7e-171) {
tmp = t_1;
} else if (t <= 1.9e-34) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if t <= -1.7e-171: tmp = t_1 elif t <= 1.9e-34: tmp = x * (1.0 - (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (t <= -1.7e-171) tmp = t_1; elseif (t <= 1.9e-34) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (t <= -1.7e-171) tmp = t_1; elseif (t <= 1.9e-34) tmp = x * (1.0 - (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e-171], t$95$1, If[LessEqual[t, 1.9e-34], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-34}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.69999999999999993e-171 or 1.9000000000000001e-34 < t Initial program 62.6%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6450.5%
Simplified50.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6470.5%
Applied egg-rr70.5%
if -1.69999999999999993e-171 < t < 1.9000000000000001e-34Initial program 73.6%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.8%
Applied egg-rr79.8%
Taylor expanded in z around 0
/-lowering-/.f6467.3%
Simplified67.3%
Taylor expanded in x around inf
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6465.0%
Simplified65.0%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.3e+45) t (if (<= z 3.8e+100) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+45) {
tmp = t;
} else if (z <= 3.8e+100) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.3d+45)) then
tmp = t
else if (z <= 3.8d+100) then
tmp = x * (1.0d0 - (y / a))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.3e+45) {
tmp = t;
} else if (z <= 3.8e+100) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.3e+45: tmp = t elif z <= 3.8e+100: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.3e+45) tmp = t; elseif (z <= 3.8e+100) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.3e+45) tmp = t; elseif (z <= 3.8e+100) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+45], t, If[LessEqual[z, 3.8e+100], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+45}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+100}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.3000000000000001e45 or 3.79999999999999963e100 < z Initial program 37.3%
Taylor expanded in z around inf
Simplified55.0%
if -3.3000000000000001e45 < z < 3.79999999999999963e100Initial program 86.4%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6494.5%
Applied egg-rr94.5%
Taylor expanded in z around 0
/-lowering-/.f6471.8%
Simplified71.8%
Taylor expanded in x around inf
mul-1-negN/A
sub-negN/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f6458.2%
Simplified58.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.4e+85) t (if (<= z 0.00043) (* t (/ y (- a z))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.4e+85) {
tmp = t;
} else if (z <= 0.00043) {
tmp = t * (y / (a - z));
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.4d+85)) then
tmp = t
else if (z <= 0.00043d0) then
tmp = t * (y / (a - z))
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.4e+85) {
tmp = t;
} else if (z <= 0.00043) {
tmp = t * (y / (a - z));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.4e+85: tmp = t elif z <= 0.00043: tmp = t * (y / (a - z)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.4e+85) tmp = t; elseif (z <= 0.00043) tmp = Float64(t * Float64(y / Float64(a - z))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.4e+85) tmp = t; elseif (z <= 0.00043) tmp = t * (y / (a - z)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.4e+85], t, If[LessEqual[z, 0.00043], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+85}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 0.00043:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.4000000000000004e85 or 4.29999999999999989e-4 < z Initial program 39.6%
Taylor expanded in z around inf
Simplified53.1%
if -7.4000000000000004e85 < z < 4.29999999999999989e-4Initial program 88.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6439.5%
Simplified39.5%
Taylor expanded in y around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6438.0%
Simplified38.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.5e+60) t (if (<= z 0.00106) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+60) {
tmp = t;
} else if (z <= 0.00106) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.5d+60)) then
tmp = t
else if (z <= 0.00106d0) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+60) {
tmp = t;
} else if (z <= 0.00106) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e+60: tmp = t elif z <= 0.00106: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e+60) tmp = t; elseif (z <= 0.00106) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e+60) tmp = t; elseif (z <= 0.00106) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+60], t, If[LessEqual[z, 0.00106], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+60}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 0.00106:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.50000000000000013e60 or 0.00105999999999999996 < z Initial program 40.5%
Taylor expanded in z around inf
Simplified51.9%
if -4.50000000000000013e60 < z < 0.00105999999999999996Initial program 89.6%
Taylor expanded in a around inf
Simplified33.5%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 65.9%
Taylor expanded in z around inf
Simplified28.0%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 65.9%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6484.0%
Applied egg-rr84.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6445.0%
Simplified45.0%
Taylor expanded in z around inf
Simplified2.8%
metadata-evalN/A
mul0-rgt2.8%
Applied egg-rr2.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* (/ y z) (- t x)))))
(if (< z -1.2536131056095036e+188)
t_1
(if (< z 4.446702369113811e+64)
(+ x (/ (- y z) (/ (- a z) (- t x))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t - ((y / z) * (t - x))
if (z < (-1.2536131056095036d+188)) then
tmp = t_1
else if (z < 4.446702369113811d+64) then
tmp = x + ((y - z) / ((a - z) / (t - x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((y / z) * (t - x));
double tmp;
if (z < -1.2536131056095036e+188) {
tmp = t_1;
} else if (z < 4.446702369113811e+64) {
tmp = x + ((y - z) / ((a - z) / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((y / z) * (t - x)) tmp = 0 if z < -1.2536131056095036e+188: tmp = t_1 elif z < 4.446702369113811e+64: tmp = x + ((y - z) / ((a - z) / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x))) tmp = 0.0 if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((y / z) * (t - x)); tmp = 0.0; if (z < -1.2536131056095036e+188) tmp = t_1; elseif (z < 4.446702369113811e+64) tmp = x + ((y - z) / ((a - z) / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024138
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
(+ x (/ (* (- y z) (- t x)) (- a z))))