
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y x) (/ (- a t) (- z t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -2e-263)
t_1
(if (<= t_2 0.0) (+ y (/ (* (- y x) (- a z)) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) / ((a - t) / (z - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-263) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / 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) :: t_2
real(8) :: tmp
t_1 = x + ((y - x) / ((a - t) / (z - t)))
t_2 = x + (((y - x) * (z - t)) / (a - t))
if (t_2 <= (-2d-263)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = y + (((y - x) * (a - z)) / 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 - x) / ((a - t) / (z - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-263) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - x) / ((a - t) / (z - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -2e-263: tmp = t_1 elif t_2 <= 0.0: tmp = y + (((y - x) * (a - z)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-263) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - x) / ((a - t) / (z - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -2e-263) tmp = t_1; elseif (t_2 <= 0.0) tmp = y + (((y - x) * (a - z)) / 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 - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-263], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{a - t}{z - t}}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-263}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2e-263 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 76.8%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6491.4%
Applied egg-rr91.4%
if -2e-263 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in t 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--.f6499.7%
Simplified99.7%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (/ (- y x) (- a t)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-263)
t_2
(if (<= t_2 0.0)
(+ y (/ (* (- y x) (- a z)) t))
(if (<= t_2 1e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -2e-263) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_2 <= 1e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * ((y - x) / (a - t)));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -2e-263) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + (((y - x) * (a - z)) / t);
} else if (t_2 <= 1e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * ((y - x) / (a - t))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -2e-263: tmp = t_2 elif t_2 <= 0.0: tmp = y + (((y - x) * (a - z)) / t) elif t_2 <= 1e+275: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t)))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -2e-263) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); elseif (t_2 <= 1e+275) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) * ((y - x) / (a - t))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -2e-263) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + (((y - x) * (a - z)) / t); elseif (t_2 <= 1e+275) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-263], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-263}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 10^{+275}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 9.9999999999999996e274 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 47.3%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6481.6%
Applied egg-rr81.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2e-263 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999996e274Initial program 98.5%
if -2e-263 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in t 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--.f6499.7%
Simplified99.7%
Final simplification91.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (/ (- y x) (- a t))))))
(if (<= a -8.2e-112)
t_1
(if (<= a 6.5e-149) (+ y (/ (* (- y x) (- a z)) t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * ((y - x) / (a - t)));
double tmp;
if (a <= -8.2e-112) {
tmp = t_1;
} else if (a <= 6.5e-149) {
tmp = y + (((y - x) * (a - z)) / 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 + ((z - t) * ((y - x) / (a - t)))
if (a <= (-8.2d-112)) then
tmp = t_1
else if (a <= 6.5d-149) then
tmp = y + (((y - x) * (a - z)) / 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 + ((z - t) * ((y - x) / (a - t)));
double tmp;
if (a <= -8.2e-112) {
tmp = t_1;
} else if (a <= 6.5e-149) {
tmp = y + (((y - x) * (a - z)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * ((y - x) / (a - t))) tmp = 0 if a <= -8.2e-112: tmp = t_1 elif a <= 6.5e-149: tmp = y + (((y - x) * (a - z)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / Float64(a - t)))) tmp = 0.0 if (a <= -8.2e-112) tmp = t_1; elseif (a <= 6.5e-149) tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) * ((y - x) / (a - t))); tmp = 0.0; if (a <= -8.2e-112) tmp = t_1; elseif (a <= 6.5e-149) tmp = y + (((y - x) * (a - z)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.2e-112], t$95$1, If[LessEqual[a, 6.5e-149], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \frac{y - x}{a - t}\\
\mathbf{if}\;a \leq -8.2 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-149}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.19999999999999991e-112 or 6.50000000000000019e-149 < a Initial program 73.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6485.5%
Applied egg-rr85.5%
if -8.19999999999999991e-112 < a < 6.50000000000000019e-149Initial program 67.6%
Taylor expanded in t 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--.f6488.5%
Simplified88.5%
Final simplification86.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.8e+147)
y
(if (<= t -6.2e-151)
(* y (/ z (- a t)))
(if (<= t 920000.0) (* x (- 1.0 (/ z a))) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+147) {
tmp = y;
} else if (t <= -6.2e-151) {
tmp = y * (z / (a - t));
} else if (t <= 920000.0) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
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 (t <= (-2.8d+147)) then
tmp = y
else if (t <= (-6.2d-151)) then
tmp = y * (z / (a - t))
else if (t <= 920000.0d0) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.8e+147) {
tmp = y;
} else if (t <= -6.2e-151) {
tmp = y * (z / (a - t));
} else if (t <= 920000.0) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.8e+147: tmp = y elif t <= -6.2e-151: tmp = y * (z / (a - t)) elif t <= 920000.0: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.8e+147) tmp = y; elseif (t <= -6.2e-151) tmp = Float64(y * Float64(z / Float64(a - t))); elseif (t <= 920000.0) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.8e+147) tmp = y; elseif (t <= -6.2e-151) tmp = y * (z / (a - t)); elseif (t <= 920000.0) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.8e+147], y, If[LessEqual[t, -6.2e-151], N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 920000.0], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+147}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -6.2 \cdot 10^{-151}:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;t \leq 920000:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.8000000000000001e147 or 9.2e5 < t Initial program 41.7%
Taylor expanded in t around inf
Simplified49.9%
if -2.8000000000000001e147 < t < -6.19999999999999969e-151Initial program 82.4%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6461.0%
Simplified61.0%
Taylor expanded in z around inf
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6440.7%
Simplified40.7%
if -6.19999999999999969e-151 < t < 9.2e5Initial program 92.4%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.8%
Applied egg-rr99.8%
Taylor expanded in t around 0
/-lowering-/.f6480.9%
Simplified80.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6456.0%
Simplified56.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.5e+57)
(/ y (/ (- a t) (- z t)))
(if (<= t 1.8e-19)
(+ x (/ (- y x) (/ (- a t) z)))
(+ y (/ (* (- y x) (- a z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+57) {
tmp = y / ((a - t) / (z - t));
} else if (t <= 1.8e-19) {
tmp = x + ((y - x) / ((a - t) / z));
} else {
tmp = y + (((y - x) * (a - z)) / 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 (t <= (-9.5d+57)) then
tmp = y / ((a - t) / (z - t))
else if (t <= 1.8d-19) then
tmp = x + ((y - x) / ((a - t) / z))
else
tmp = y + (((y - x) * (a - z)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e+57) {
tmp = y / ((a - t) / (z - t));
} else if (t <= 1.8e-19) {
tmp = x + ((y - x) / ((a - t) / z));
} else {
tmp = y + (((y - x) * (a - z)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.5e+57: tmp = y / ((a - t) / (z - t)) elif t <= 1.8e-19: tmp = x + ((y - x) / ((a - t) / z)) else: tmp = y + (((y - x) * (a - z)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e+57) tmp = Float64(y / Float64(Float64(a - t) / Float64(z - t))); elseif (t <= 1.8e-19) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); else tmp = Float64(y + Float64(Float64(Float64(y - x) * Float64(a - z)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.5e+57) tmp = y / ((a - t) / (z - t)); elseif (t <= 1.8e-19) tmp = x + ((y - x) / ((a - t) / z)); else tmp = y + (((y - x) * (a - z)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e+57], N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-19], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(N[(y - x), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{y}{\frac{a - t}{z - t}}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{\left(y - x\right) \cdot \left(a - z\right)}{t}\\
\end{array}
\end{array}
if t < -9.4999999999999997e57Initial program 40.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6438.8%
Simplified38.8%
associate-/l*N/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6467.9%
Applied egg-rr67.9%
if -9.4999999999999997e57 < t < 1.8000000000000001e-19Initial program 90.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.2%
Applied egg-rr97.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6487.0%
Simplified87.0%
if 1.8000000000000001e-19 < t Initial program 52.9%
Taylor expanded in t 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.9%
Simplified69.9%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ (- a t) (- z t)))))
(if (<= t -1e+58)
t_1
(if (<= t 18000000000.0) (+ x (/ (- y x) (/ (- a t) z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / ((a - t) / (z - t));
double tmp;
if (t <= -1e+58) {
tmp = t_1;
} else if (t <= 18000000000.0) {
tmp = x + ((y - x) / ((a - t) / 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 = y / ((a - t) / (z - t))
if (t <= (-1d+58)) then
tmp = t_1
else if (t <= 18000000000.0d0) then
tmp = x + ((y - x) / ((a - t) / 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 = y / ((a - t) / (z - t));
double tmp;
if (t <= -1e+58) {
tmp = t_1;
} else if (t <= 18000000000.0) {
tmp = x + ((y - x) / ((a - t) / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / ((a - t) / (z - t)) tmp = 0 if t <= -1e+58: tmp = t_1 elif t <= 18000000000.0: tmp = x + ((y - x) / ((a - t) / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(Float64(a - t) / Float64(z - t))) tmp = 0.0 if (t <= -1e+58) tmp = t_1; elseif (t <= 18000000000.0) tmp = Float64(x + Float64(Float64(y - x) / Float64(Float64(a - t) / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / ((a - t) / (z - t)); tmp = 0.0; if (t <= -1e+58) tmp = t_1; elseif (t <= 18000000000.0) tmp = x + ((y - x) / ((a - t) / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+58], t$95$1, If[LessEqual[t, 18000000000.0], N[(x + N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 18000000000:\\
\;\;\;\;x + \frac{y - x}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.99999999999999944e57 or 1.8e10 < t Initial program 44.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6447.5%
Simplified47.5%
associate-/l*N/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6467.7%
Applied egg-rr67.7%
if -9.99999999999999944e57 < t < 1.8e10Initial program 90.0%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6496.7%
Applied egg-rr96.7%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f6486.5%
Simplified86.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (/ (- a t) (- z t)))))
(if (<= t -7.2e-54)
t_1
(if (<= t 2.55e-14) (+ x (/ (- y x) (/ a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / ((a - t) / (z - t));
double tmp;
if (t <= -7.2e-54) {
tmp = t_1;
} else if (t <= 2.55e-14) {
tmp = x + ((y - x) / (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 = y / ((a - t) / (z - t))
if (t <= (-7.2d-54)) then
tmp = t_1
else if (t <= 2.55d-14) then
tmp = x + ((y - x) / (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 = y / ((a - t) / (z - t));
double tmp;
if (t <= -7.2e-54) {
tmp = t_1;
} else if (t <= 2.55e-14) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / ((a - t) / (z - t)) tmp = 0 if t <= -7.2e-54: tmp = t_1 elif t <= 2.55e-14: tmp = x + ((y - x) / (a / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(Float64(a - t) / Float64(z - t))) tmp = 0.0 if (t <= -7.2e-54) tmp = t_1; elseif (t <= 2.55e-14) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / ((a - t) / (z - t)); tmp = 0.0; if (t <= -7.2e-54) tmp = t_1; elseif (t <= 2.55e-14) tmp = x + ((y - x) / (a / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.2e-54], t$95$1, If[LessEqual[t, 2.55e-14], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{if}\;t \leq -7.2 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.19999999999999953e-54 or 2.5499999999999999e-14 < t Initial program 56.3%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6450.5%
Simplified50.5%
associate-/l*N/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6464.8%
Applied egg-rr64.8%
if -7.19999999999999953e-54 < t < 2.5499999999999999e-14Initial program 92.2%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6499.0%
Applied egg-rr99.0%
Taylor expanded in t around 0
/-lowering-/.f6480.3%
Simplified80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- a t)))))
(if (<= t -5e-56)
t_1
(if (<= t 2800000000000.0) (+ x (/ (- y x) (/ a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (a - t));
double tmp;
if (t <= -5e-56) {
tmp = t_1;
} else if (t <= 2800000000000.0) {
tmp = x + ((y - x) / (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 = (z - t) * (y / (a - t))
if (t <= (-5d-56)) then
tmp = t_1
else if (t <= 2800000000000.0d0) then
tmp = x + ((y - x) / (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 = (z - t) * (y / (a - t));
double tmp;
if (t <= -5e-56) {
tmp = t_1;
} else if (t <= 2800000000000.0) {
tmp = x + ((y - x) / (a / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (a - t)) tmp = 0 if t <= -5e-56: tmp = t_1 elif t <= 2800000000000.0: tmp = x + ((y - x) / (a / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t))) tmp = 0.0 if (t <= -5e-56) tmp = t_1; elseif (t <= 2800000000000.0) tmp = Float64(x + Float64(Float64(y - x) / Float64(a / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (a - t)); tmp = 0.0; if (t <= -5e-56) tmp = t_1; elseif (t <= 2800000000000.0) tmp = x + ((y - x) / (a / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e-56], t$95$1, If[LessEqual[t, 2800000000000.0], N[(x + N[(N[(y - x), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2800000000000:\\
\;\;\;\;x + \frac{y - x}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.99999999999999997e-56 or 2.8e12 < t Initial program 55.5%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6451.4%
Simplified51.4%
associate-/l*N/A
clear-numN/A
div-invN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6458.0%
Applied egg-rr58.0%
if -4.99999999999999997e-56 < t < 2.8e12Initial program 91.1%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.5%
Applied egg-rr97.5%
Taylor expanded in t around 0
/-lowering-/.f6477.3%
Simplified77.3%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- z t) (/ y (- a t))))) (if (<= t -2.05e-109) t_1 (if (<= t 8e-17) (+ x (* z (/ (- y x) a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (a - t));
double tmp;
if (t <= -2.05e-109) {
tmp = t_1;
} else if (t <= 8e-17) {
tmp = x + (z * ((y - x) / 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 = (z - t) * (y / (a - t))
if (t <= (-2.05d-109)) then
tmp = t_1
else if (t <= 8d-17) then
tmp = x + (z * ((y - x) / 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 = (z - t) * (y / (a - t));
double tmp;
if (t <= -2.05e-109) {
tmp = t_1;
} else if (t <= 8e-17) {
tmp = x + (z * ((y - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (a - t)) tmp = 0 if t <= -2.05e-109: tmp = t_1 elif t <= 8e-17: tmp = x + (z * ((y - x) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t))) tmp = 0.0 if (t <= -2.05e-109) tmp = t_1; elseif (t <= 8e-17) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (a - t)); tmp = 0.0; if (t <= -2.05e-109) tmp = t_1; elseif (t <= 8e-17) tmp = x + (z * ((y - x) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e-109], t$95$1, If[LessEqual[t, 8e-17], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-17}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.0500000000000001e-109 or 8.00000000000000057e-17 < t Initial program 57.7%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6451.5%
Simplified51.5%
associate-/l*N/A
clear-numN/A
div-invN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6456.9%
Applied egg-rr56.9%
if -2.0500000000000001e-109 < t < 8.00000000000000057e-17Initial program 92.7%
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--.f6479.0%
Simplified79.0%
Taylor expanded in z around inf
Simplified79.1%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* x (- 1.0 (/ z a))))) (if (<= x -4e+106) t_1 (if (<= x 5e+45) (* (- z t) (/ y (- a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (x <= -4e+106) {
tmp = t_1;
} else if (x <= 5e+45) {
tmp = (z - t) * (y / (a - 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 * (1.0d0 - (z / a))
if (x <= (-4d+106)) then
tmp = t_1
else if (x <= 5d+45) then
tmp = (z - t) * (y / (a - 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 * (1.0 - (z / a));
double tmp;
if (x <= -4e+106) {
tmp = t_1;
} else if (x <= 5e+45) {
tmp = (z - t) * (y / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if x <= -4e+106: tmp = t_1 elif x <= 5e+45: tmp = (z - t) * (y / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (x <= -4e+106) tmp = t_1; elseif (x <= 5e+45) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (x <= -4e+106) tmp = t_1; elseif (x <= 5e+45) tmp = (z - t) * (y / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4e+106], t$95$1, If[LessEqual[x, 5e+45], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;x \leq -4 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+45}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.00000000000000036e106 or 5e45 < x Initial program 60.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6476.4%
Applied egg-rr76.4%
Taylor expanded in t around 0
/-lowering-/.f6455.6%
Simplified55.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6448.8%
Simplified48.8%
if -4.00000000000000036e106 < x < 5e45Initial program 78.9%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6461.6%
Simplified61.6%
associate-/l*N/A
clear-numN/A
div-invN/A
associate-/r/N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6465.6%
Applied egg-rr65.6%
Final simplification59.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -2e+106) y (if (<= t 1.85e+30) (+ x (/ (* y z) a)) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+106) {
tmp = y;
} else if (t <= 1.85e+30) {
tmp = x + ((y * z) / a);
} else {
tmp = y;
}
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 (t <= (-2d+106)) then
tmp = y
else if (t <= 1.85d+30) then
tmp = x + ((y * z) / a)
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+106) {
tmp = y;
} else if (t <= 1.85e+30) {
tmp = x + ((y * z) / a);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+106: tmp = y elif t <= 1.85e+30: tmp = x + ((y * z) / a) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+106) tmp = y; elseif (t <= 1.85e+30) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e+106) tmp = y; elseif (t <= 1.85e+30) tmp = x + ((y * z) / a); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+106], y, If[LessEqual[t, 1.85e+30], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+106}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+30}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.00000000000000018e106 or 1.85000000000000008e30 < t Initial program 42.3%
Taylor expanded in t around inf
Simplified50.4%
if -2.00000000000000018e106 < t < 1.85000000000000008e30Initial program 88.5%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6495.2%
Applied egg-rr95.2%
Taylor expanded in t around 0
/-lowering-/.f6468.0%
Simplified68.0%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f6454.5%
Simplified54.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.5e+72) y (if (<= t 1500000.0) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+72) {
tmp = y;
} else if (t <= 1500000.0) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
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 (t <= (-4.5d+72)) then
tmp = y
else if (t <= 1500000.0d0) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+72) {
tmp = y;
} else if (t <= 1500000.0) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e+72: tmp = y elif t <= 1500000.0: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e+72) tmp = y; elseif (t <= 1500000.0) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.5e+72) tmp = y; elseif (t <= 1500000.0) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e+72], y, If[LessEqual[t, 1500000.0], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+72}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1500000:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.4999999999999998e72 or 1.5e6 < t Initial program 43.9%
Taylor expanded in t around inf
Simplified47.5%
if -4.4999999999999998e72 < t < 1.5e6Initial program 90.7%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6497.3%
Applied egg-rr97.3%
Taylor expanded in t around 0
/-lowering-/.f6470.7%
Simplified70.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6448.3%
Simplified48.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ y (/ a z)))) (if (<= z -3.1e+125) t_1 (if (<= z 6e+76) (+ x y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (a / z);
double tmp;
if (z <= -3.1e+125) {
tmp = t_1;
} else if (z <= 6e+76) {
tmp = x + y;
} 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 = y / (a / z)
if (z <= (-3.1d+125)) then
tmp = t_1
else if (z <= 6d+76) then
tmp = 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 a) {
double t_1 = y / (a / z);
double tmp;
if (z <= -3.1e+125) {
tmp = t_1;
} else if (z <= 6e+76) {
tmp = x + y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (a / z) tmp = 0 if z <= -3.1e+125: tmp = t_1 elif z <= 6e+76: tmp = x + y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(a / z)) tmp = 0.0 if (z <= -3.1e+125) tmp = t_1; elseif (z <= 6e+76) tmp = Float64(x + y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (a / z); tmp = 0.0; if (z <= -3.1e+125) tmp = t_1; elseif (z <= 6e+76) tmp = x + y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+125], t$95$1, If[LessEqual[z, 6e+76], N[(x + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{\frac{a}{z}}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.1e125 or 5.9999999999999996e76 < z Initial program 74.8%
Taylor expanded in x around 0
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f6449.2%
Simplified49.2%
associate-/l*N/A
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6461.5%
Applied egg-rr61.5%
Taylor expanded in t around 0
/-lowering-/.f6443.2%
Simplified43.2%
if -3.1e125 < z < 5.9999999999999996e76Initial program 70.3%
Taylor expanded in t around inf
--lowering--.f6426.4%
Simplified26.4%
Taylor expanded in y around inf
Simplified42.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.2e-27) y (if (<= t 650000.0) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e-27) {
tmp = y;
} else if (t <= 650000.0) {
tmp = x;
} else {
tmp = y;
}
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 (t <= (-3.2d-27)) then
tmp = y
else if (t <= 650000.0d0) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.2e-27) {
tmp = y;
} else if (t <= 650000.0) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.2e-27: tmp = y elif t <= 650000.0: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.2e-27) tmp = y; elseif (t <= 650000.0) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.2e-27) tmp = y; elseif (t <= 650000.0) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e-27], y, If[LessEqual[t, 650000.0], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-27}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 650000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -3.19999999999999991e-27 or 6.5e5 < t Initial program 52.7%
Taylor expanded in t around inf
Simplified41.0%
if -3.19999999999999991e-27 < t < 6.5e5Initial program 92.9%
Taylor expanded in a around inf
Simplified33.8%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 72.0%
Taylor expanded in a around inf
Simplified22.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - 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 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024160
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))