
(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 16 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 (/ (* (- x y) (- t z)) (- a t)))))
(if (or (<= t_1 -2e-242) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(-
y
(pow
(/ t (+ (fma (- y x) z (* a (/ (* (- y x) (- z a)) t))) (* a (- x y))))
-1.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -2e-242) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y - pow((t / (fma((y - x), z, (a * (((y - x) * (z - a)) / t))) + (a * (x - y)))), -1.0);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -2e-242) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y - (Float64(t / Float64(fma(Float64(y - x), z, Float64(a * Float64(Float64(Float64(y - x) * Float64(z - a)) / t))) + Float64(a * Float64(x - y)))) ^ -1.0)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-242], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y - N[Power[N[(t / N[(N[(N[(y - x), $MachinePrecision] * z + N[(a * N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-242} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y - {\left(\frac{t}{\mathsf{fma}\left(y - x, z, a \cdot \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + a \cdot \left(x - y\right)}\right)}^{-1}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2e-242 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.7%
+-commutative68.7%
associate-/l*90.2%
fma-define90.2%
Simplified90.2%
if -2e-242 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.9%
+-commutative9.9%
associate-/l*9.9%
fma-define9.9%
Simplified9.9%
Taylor expanded in t around -inf 94.5%
clear-num94.5%
inv-pow94.5%
*-commutative94.5%
fma-define94.5%
associate-/l*100.0%
distribute-rgt-out--100.0%
*-commutative100.0%
Applied egg-rr100.0%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- x y) (- t z)) (- a t)))))
(if (or (<= t_1 -2e-242) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(- y (/ (* (- y x) (- z a)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -2e-242) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y - (((y - x) * (z - a)) / t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -2e-242) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-242], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-242} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2e-242 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.7%
+-commutative68.7%
associate-/l*90.2%
fma-define90.2%
Simplified90.2%
if -2e-242 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.9%
+-commutative9.9%
associate-/l*9.9%
fma-define9.9%
Simplified9.9%
Taylor expanded in t around inf 99.9%
associate--l+99.9%
associate-*r/99.9%
associate-*r/99.9%
mul-1-neg99.9%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
unsub-neg99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (* (- y x) (/ -1.0 (- t a))))))
(t_2 (+ x (/ (* (- x y) (- t z)) (- a t)))))
(if (<= t_2 -2e-199)
t_1
(if (<= t_2 0.0)
(- y (/ (* (- y x) (- z a)) t))
(if (<= t_2 2e+304) t_2 t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * ((y - x) * (-1.0 / (t - a))));
double t_2 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if (t_2 <= -2e-199) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_2 <= 2e+304) {
tmp = t_2;
} 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 + ((z - t) * ((y - x) * ((-1.0d0) / (t - a))))
t_2 = x + (((x - y) * (t - z)) / (a - t))
if (t_2 <= (-2d-199)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = y - (((y - x) * (z - a)) / t)
else if (t_2 <= 2d+304) then
tmp = t_2
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) * (-1.0 / (t - a))));
double t_2 = x + (((x - y) * (t - z)) / (a - t));
double tmp;
if (t_2 <= -2e-199) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_2 <= 2e+304) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * ((y - x) * (-1.0 / (t - a)))) t_2 = x + (((x - y) * (t - z)) / (a - t)) tmp = 0 if t_2 <= -2e-199: tmp = t_1 elif t_2 <= 0.0: tmp = y - (((y - x) * (z - a)) / t) elif t_2 <= 2e+304: 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(-1.0 / Float64(t - a))))) t_2 = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-199) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); elseif (t_2 <= 2e+304) 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) * (-1.0 / (t - a)))); t_2 = x + (((x - y) * (t - z)) / (a - t)); tmp = 0.0; if (t_2 <= -2e-199) tmp = t_1; elseif (t_2 <= 0.0) tmp = y - (((y - x) * (z - a)) / t); elseif (t_2 <= 2e+304) 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[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-199], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+304], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\
t_2 := x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -1.99999999999999996e-199 or 1.9999999999999999e304 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 55.8%
div-inv55.8%
*-commutative55.8%
associate-*l*87.7%
Applied egg-rr87.7%
if -1.99999999999999996e-199 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 18.2%
+-commutative18.2%
associate-/l*18.4%
fma-define18.4%
Simplified18.4%
Taylor expanded in t around inf 95.3%
associate--l+95.3%
associate-*r/95.3%
associate-*r/95.3%
mul-1-neg95.3%
div-sub95.3%
mul-1-neg95.3%
distribute-lft-out--95.3%
associate-*r/95.3%
mul-1-neg95.3%
unsub-neg95.3%
distribute-rgt-out--95.3%
Simplified95.3%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 1.9999999999999999e304Initial program 93.6%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.05e+58) (not (<= t 1.55e+49))) (+ y (* (- y x) (/ (- a z) t))) (+ x (/ (* (- x y) (- t z)) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.05e+58) || !(t <= 1.55e+49)) {
tmp = y + ((y - x) * ((a - z) / t));
} else {
tmp = x + (((x - y) * (t - z)) / (a - 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 <= (-1.05d+58)) .or. (.not. (t <= 1.55d+49))) then
tmp = y + ((y - x) * ((a - z) / t))
else
tmp = x + (((x - y) * (t - z)) / (a - 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 <= -1.05e+58) || !(t <= 1.55e+49)) {
tmp = y + ((y - x) * ((a - z) / t));
} else {
tmp = x + (((x - y) * (t - z)) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.05e+58) or not (t <= 1.55e+49): tmp = y + ((y - x) * ((a - z) / t)) else: tmp = x + (((x - y) * (t - z)) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.05e+58) || !(t <= 1.55e+49)) tmp = Float64(y + Float64(Float64(y - x) * Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(Float64(Float64(x - y) * Float64(t - z)) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.05e+58) || ~((t <= 1.55e+49))) tmp = y + ((y - x) * ((a - z) / t)); else tmp = x + (((x - y) * (t - z)) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.05e+58], N[Not[LessEqual[t, 1.55e+49]], $MachinePrecision]], N[(y + N[(N[(y - x), $MachinePrecision] * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(x - y), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+58} \lor \neg \left(t \leq 1.55 \cdot 10^{+49}\right):\\
\;\;\;\;y + \left(y - x\right) \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(x - y\right) \cdot \left(t - z\right)}{a - t}\\
\end{array}
\end{array}
if t < -1.05000000000000006e58 or 1.54999999999999996e49 < t Initial program 37.7%
+-commutative37.7%
associate-/l*72.4%
fma-define72.4%
Simplified72.4%
Taylor expanded in t around -inf 53.6%
Taylor expanded in t around inf 59.4%
distribute-rgt-out--59.6%
associate-/l*78.9%
Simplified78.9%
if -1.05000000000000006e58 < t < 1.54999999999999996e49Initial program 90.9%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.8e+46) (not (<= a 2.4e-39))) (+ x (/ y (/ (- a t) (- z t)))) (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+46) || !(a <= 2.4e-39)) {
tmp = x + (y / ((a - t) / (z - t)));
} else {
tmp = y + (z * ((x - y) / 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 ((a <= (-1.8d+46)) .or. (.not. (a <= 2.4d-39))) then
tmp = x + (y / ((a - t) / (z - t)))
else
tmp = y + (z * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.8e+46) || !(a <= 2.4e-39)) {
tmp = x + (y / ((a - t) / (z - t)));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.8e+46) or not (a <= 2.4e-39): tmp = x + (y / ((a - t) / (z - t))) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.8e+46) || !(a <= 2.4e-39)) tmp = Float64(x + Float64(y / Float64(Float64(a - t) / Float64(z - t)))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.8e+46) || ~((a <= 2.4e-39))) tmp = x + (y / ((a - t) / (z - t))); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.8e+46], N[Not[LessEqual[a, 2.4e-39]], $MachinePrecision]], N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+46} \lor \neg \left(a \leq 2.4 \cdot 10^{-39}\right):\\
\;\;\;\;x + \frac{y}{\frac{a - t}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.7999999999999999e46 or 2.40000000000000016e-39 < a Initial program 63.9%
Taylor expanded in y around inf 64.4%
*-commutative64.4%
*-lft-identity64.4%
times-frac80.1%
/-rgt-identity80.1%
Simplified80.1%
div-inv80.1%
Applied egg-rr80.1%
*-commutative80.1%
un-div-inv80.1%
associate-*l/64.4%
associate-*r/83.4%
clear-num82.8%
un-div-inv82.8%
Applied egg-rr82.8%
if -1.7999999999999999e46 < a < 2.40000000000000016e-39Initial program 65.2%
+-commutative65.2%
associate-/l*78.2%
fma-define78.3%
Simplified78.3%
Taylor expanded in t around -inf 65.4%
Taylor expanded in t around inf 75.8%
distribute-rgt-out--75.8%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in a around 0 75.9%
mul-1-neg75.9%
unsub-neg75.9%
associate-/l*82.8%
Simplified82.8%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e+50) (not (<= a 5.4e-39))) (+ x (* (- z t) (/ y (- a t)))) (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+50) || !(a <= 5.4e-39)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + (z * ((x - y) / 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 ((a <= (-1.9d+50)) .or. (.not. (a <= 5.4d-39))) then
tmp = x + ((z - t) * (y / (a - t)))
else
tmp = y + (z * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+50) || !(a <= 5.4e-39)) {
tmp = x + ((z - t) * (y / (a - t)));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e+50) or not (a <= 5.4e-39): tmp = x + ((z - t) * (y / (a - t))) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e+50) || !(a <= 5.4e-39)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.9e+50) || ~((a <= 5.4e-39))) tmp = x + ((z - t) * (y / (a - t))); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e+50], N[Not[LessEqual[a, 5.4e-39]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+50} \lor \neg \left(a \leq 5.4 \cdot 10^{-39}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.89999999999999994e50 or 5.4000000000000001e-39 < a Initial program 63.9%
Taylor expanded in y around inf 64.4%
*-commutative64.4%
*-lft-identity64.4%
times-frac80.1%
/-rgt-identity80.1%
Simplified80.1%
if -1.89999999999999994e50 < a < 5.4000000000000001e-39Initial program 65.2%
+-commutative65.2%
associate-/l*78.2%
fma-define78.3%
Simplified78.3%
Taylor expanded in t around -inf 65.4%
Taylor expanded in t around inf 75.8%
distribute-rgt-out--75.8%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in a around 0 75.9%
mul-1-neg75.9%
unsub-neg75.9%
associate-/l*82.8%
Simplified82.8%
Final simplification81.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.2e+48) (not (<= a 5.6e+27))) (- x (* (/ (- z t) a) (- x y))) (+ y (* z (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.2e+48) || !(a <= 5.6e+27)) {
tmp = x - (((z - t) / a) * (x - y));
} else {
tmp = y + (z * ((x - y) / 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 ((a <= (-4.2d+48)) .or. (.not. (a <= 5.6d+27))) then
tmp = x - (((z - t) / a) * (x - y))
else
tmp = y + (z * ((x - y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.2e+48) || !(a <= 5.6e+27)) {
tmp = x - (((z - t) / a) * (x - y));
} else {
tmp = y + (z * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.2e+48) or not (a <= 5.6e+27): tmp = x - (((z - t) / a) * (x - y)) else: tmp = y + (z * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.2e+48) || !(a <= 5.6e+27)) tmp = Float64(x - Float64(Float64(Float64(z - t) / a) * Float64(x - y))); else tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.2e+48) || ~((a <= 5.6e+27))) tmp = x - (((z - t) / a) * (x - y)); else tmp = y + (z * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.2e+48], N[Not[LessEqual[a, 5.6e+27]], $MachinePrecision]], N[(x - N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+48} \lor \neg \left(a \leq 5.6 \cdot 10^{+27}\right):\\
\;\;\;\;x - \frac{z - t}{a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -4.1999999999999997e48 or 5.5999999999999999e27 < a Initial program 63.8%
Taylor expanded in a around inf 57.1%
associate-/l*75.0%
Simplified75.0%
if -4.1999999999999997e48 < a < 5.5999999999999999e27Initial program 65.1%
+-commutative65.1%
associate-/l*79.6%
fma-define79.6%
Simplified79.6%
Taylor expanded in t around -inf 65.0%
Taylor expanded in t around inf 74.7%
distribute-rgt-out--74.7%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in a around 0 74.7%
mul-1-neg74.7%
unsub-neg74.7%
associate-/l*82.4%
Simplified82.4%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.4e+132) (not (<= a 1.65e+66))) (+ x (* y (/ (- z t) a))) (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.4e+132) || !(a <= 1.65e+66)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y * ((z - t) / (a - 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 ((a <= (-5.4d+132)) .or. (.not. (a <= 1.65d+66))) then
tmp = x + (y * ((z - t) / a))
else
tmp = y * ((z - t) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.4e+132) || !(a <= 1.65e+66)) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.4e+132) or not (a <= 1.65e+66): tmp = x + (y * ((z - t) / a)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.4e+132) || !(a <= 1.65e+66)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.4e+132) || ~((a <= 1.65e+66))) tmp = x + (y * ((z - t) / a)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.4e+132], N[Not[LessEqual[a, 1.65e+66]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.4 \cdot 10^{+132} \lor \neg \left(a \leq 1.65 \cdot 10^{+66}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if a < -5.3999999999999999e132 or 1.6500000000000001e66 < a Initial program 59.1%
Taylor expanded in y around inf 61.4%
*-commutative61.4%
*-lft-identity61.4%
times-frac79.9%
/-rgt-identity79.9%
Simplified79.9%
Taylor expanded in a around inf 59.1%
associate-/l*73.0%
Simplified73.0%
if -5.3999999999999999e132 < a < 1.6500000000000001e66Initial program 67.7%
+-commutative67.7%
associate-/l*81.1%
fma-define81.1%
Simplified81.1%
add-cube-cbrt80.7%
pow380.7%
Applied egg-rr80.7%
Taylor expanded in y around inf 63.4%
Taylor expanded in y around inf 75.3%
div-sub75.3%
Simplified75.3%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.2e+52) (+ x (* y (/ (- z t) a))) (if (<= a 7.8e+30) (+ y (* z (/ (- x y) t))) (+ x (* (- z t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e+52) {
tmp = x + (y * ((z - t) / a));
} else if (a <= 7.8e+30) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x + ((z - t) * (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 <= (-4.2d+52)) then
tmp = x + (y * ((z - t) / a))
else if (a <= 7.8d+30) then
tmp = y + (z * ((x - y) / t))
else
tmp = x + ((z - t) * (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 <= -4.2e+52) {
tmp = x + (y * ((z - t) / a));
} else if (a <= 7.8e+30) {
tmp = y + (z * ((x - y) / t));
} else {
tmp = x + ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e+52: tmp = x + (y * ((z - t) / a)) elif a <= 7.8e+30: tmp = y + (z * ((x - y) / t)) else: tmp = x + ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.2e+52) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (a <= 7.8e+30) tmp = Float64(y + Float64(z * Float64(Float64(x - y) / t))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.2e+52) tmp = x + (y * ((z - t) / a)); elseif (a <= 7.8e+30) tmp = y + (z * ((x - y) / t)); else tmp = x + ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e+52], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e+30], N[(y + N[(z * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+52}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+30}:\\
\;\;\;\;y + z \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -4.2e52Initial program 70.1%
Taylor expanded in y around inf 67.7%
*-commutative67.7%
*-lft-identity67.7%
times-frac79.8%
/-rgt-identity79.8%
Simplified79.8%
Taylor expanded in a around inf 61.2%
associate-/l*73.0%
Simplified73.0%
if -4.2e52 < a < 7.80000000000000021e30Initial program 65.1%
+-commutative65.1%
associate-/l*79.6%
fma-define79.6%
Simplified79.6%
Taylor expanded in t around -inf 65.0%
Taylor expanded in t around inf 74.7%
distribute-rgt-out--74.7%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in a around 0 74.7%
mul-1-neg74.7%
unsub-neg74.7%
associate-/l*82.4%
Simplified82.4%
if 7.80000000000000021e30 < a Initial program 55.9%
Taylor expanded in y around inf 61.8%
*-commutative61.8%
*-lft-identity61.8%
times-frac78.5%
/-rgt-identity78.5%
Simplified78.5%
Taylor expanded in a around inf 69.2%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.75e+134) (+ x (* y (/ (- z t) a))) (if (<= a 6.5e+66) (* y (/ (- z t) (- a t))) (+ x (* (- z t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.75e+134) {
tmp = x + (y * ((z - t) / a));
} else if (a <= 6.5e+66) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((z - t) * (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 <= (-1.75d+134)) then
tmp = x + (y * ((z - t) / a))
else if (a <= 6.5d+66) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + ((z - t) * (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 <= -1.75e+134) {
tmp = x + (y * ((z - t) / a));
} else if (a <= 6.5e+66) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.75e+134: tmp = x + (y * ((z - t) / a)) elif a <= 6.5e+66: tmp = y * ((z - t) / (a - t)) else: tmp = x + ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.75e+134) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); elseif (a <= 6.5e+66) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.75e+134) tmp = x + (y * ((z - t) / a)); elseif (a <= 6.5e+66) tmp = y * ((z - t) / (a - t)); else tmp = x + ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.75e+134], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e+66], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{+134}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{+66}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if a < -1.75000000000000001e134Initial program 64.1%
Taylor expanded in y around inf 62.5%
*-commutative62.5%
*-lft-identity62.5%
times-frac82.1%
/-rgt-identity82.1%
Simplified82.1%
Taylor expanded in a around inf 60.5%
associate-/l*74.8%
Simplified74.8%
if -1.75000000000000001e134 < a < 6.5000000000000001e66Initial program 67.7%
+-commutative67.7%
associate-/l*81.1%
fma-define81.1%
Simplified81.1%
add-cube-cbrt80.7%
pow380.7%
Applied egg-rr80.7%
Taylor expanded in y around inf 63.4%
Taylor expanded in y around inf 75.3%
div-sub75.3%
Simplified75.3%
if 6.5000000000000001e66 < a Initial program 53.1%
Taylor expanded in y around inf 60.0%
*-commutative60.0%
*-lft-identity60.0%
times-frac77.3%
/-rgt-identity77.3%
Simplified77.3%
Taylor expanded in a around inf 71.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.45e+133) (- x (* y (/ t a))) (if (<= a 9.8e+222) (* y (/ (- z t) (- a t))) (+ x (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.45e+133) {
tmp = x - (y * (t / a));
} else if (a <= 9.8e+222) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y * (z / 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 <= (-1.45d+133)) then
tmp = x - (y * (t / a))
else if (a <= 9.8d+222) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (y * (z / 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 <= -1.45e+133) {
tmp = x - (y * (t / a));
} else if (a <= 9.8e+222) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.45e+133: tmp = x - (y * (t / a)) elif a <= 9.8e+222: tmp = y * ((z - t) / (a - t)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.45e+133) tmp = Float64(x - Float64(y * Float64(t / a))); elseif (a <= 9.8e+222) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.45e+133) tmp = x - (y * (t / a)); elseif (a <= 9.8e+222) tmp = y * ((z - t) / (a - t)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.45e+133], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.8e+222], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+133}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\mathbf{elif}\;a \leq 9.8 \cdot 10^{+222}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -1.4500000000000001e133Initial program 64.1%
Taylor expanded in y around inf 62.5%
*-commutative62.5%
*-lft-identity62.5%
times-frac82.1%
/-rgt-identity82.1%
Simplified82.1%
Taylor expanded in a around inf 60.5%
associate-/l*74.8%
Simplified74.8%
Taylor expanded in z around 0 68.0%
associate-*r/68.0%
neg-mul-168.0%
Simplified68.0%
if -1.4500000000000001e133 < a < 9.79999999999999981e222Initial program 66.7%
+-commutative66.7%
associate-/l*81.7%
fma-define81.7%
Simplified81.7%
add-cube-cbrt81.3%
pow381.3%
Applied egg-rr81.3%
Taylor expanded in y around inf 64.4%
Taylor expanded in y around inf 71.3%
div-sub71.3%
Simplified71.3%
if 9.79999999999999981e222 < a Initial program 39.6%
Taylor expanded in y around inf 64.1%
*-commutative64.1%
*-lft-identity64.1%
times-frac93.6%
/-rgt-identity93.6%
Simplified93.6%
Taylor expanded in t around 0 63.4%
associate-/l*81.4%
Simplified81.4%
Final simplification71.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.25e+55) y (if (<= t 620000.0) (+ x (* y (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.25e+55) {
tmp = y;
} else if (t <= 620000.0) {
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 <= (-2.25d+55)) then
tmp = y
else if (t <= 620000.0d0) 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 <= -2.25e+55) {
tmp = y;
} else if (t <= 620000.0) {
tmp = x + (y * (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.25e+55: tmp = y elif t <= 620000.0: tmp = x + (y * (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.25e+55) tmp = y; elseif (t <= 620000.0) tmp = Float64(x + Float64(y * 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.25e+55) tmp = y; elseif (t <= 620000.0) tmp = x + (y * (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.25e+55], y, If[LessEqual[t, 620000.0], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{+55}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 620000:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.24999999999999999e55 or 6.2e5 < t Initial program 42.0%
+-commutative42.0%
associate-/l*74.6%
fma-define74.6%
Simplified74.6%
add-cube-cbrt74.2%
pow374.2%
Applied egg-rr74.2%
Taylor expanded in t around inf 52.2%
if -2.24999999999999999e55 < t < 6.2e5Initial program 90.9%
Taylor expanded in y around inf 75.9%
*-commutative75.9%
*-lft-identity75.9%
times-frac74.8%
/-rgt-identity74.8%
Simplified74.8%
Taylor expanded in t around 0 57.9%
associate-/l*61.5%
Simplified61.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.7e-50) y (if (<= t 2.25e+23) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e-50) {
tmp = y;
} else if (t <= 2.25e+23) {
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.7d-50)) then
tmp = y
else if (t <= 2.25d+23) 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.7e-50) {
tmp = y;
} else if (t <= 2.25e+23) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e-50: tmp = y elif t <= 2.25e+23: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.7e-50) tmp = y; elseif (t <= 2.25e+23) 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.7e-50) tmp = y; elseif (t <= 2.25e+23) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.7e-50], y, If[LessEqual[t, 2.25e+23], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-50}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+23}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.7e-50 or 2.2499999999999999e23 < t Initial program 45.1%
+-commutative45.1%
associate-/l*75.6%
fma-define75.6%
Simplified75.6%
add-cube-cbrt75.2%
pow375.1%
Applied egg-rr75.1%
Taylor expanded in t around inf 49.3%
if -2.7e-50 < t < 2.2499999999999999e23Initial program 93.3%
+-commutative93.3%
associate-/l*97.9%
fma-define97.9%
Simplified97.9%
Taylor expanded in y around 0 56.9%
mul-1-neg56.9%
*-lft-identity56.9%
*-commutative56.9%
*-rgt-identity56.9%
times-frac59.7%
/-rgt-identity59.7%
distribute-lft-neg-out59.7%
mul-1-neg59.7%
distribute-rgt-in59.7%
mul-1-neg59.7%
unsub-neg59.7%
Simplified59.7%
Taylor expanded in t around 0 55.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.05e+149) x (if (<= a 7.2e+79) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e+149) {
tmp = x;
} else if (a <= 7.2e+79) {
tmp = y;
} else {
tmp = x;
}
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 <= (-1.05d+149)) then
tmp = x
else if (a <= 7.2d+79) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e+149) {
tmp = x;
} else if (a <= 7.2e+79) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.05e+149: tmp = x elif a <= 7.2e+79: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.05e+149) tmp = x; elseif (a <= 7.2e+79) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.05e+149) tmp = x; elseif (a <= 7.2e+79) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.05e+149], x, If[LessEqual[a, 7.2e+79], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{+149}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{+79}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.0500000000000001e149 or 7.1999999999999999e79 < a Initial program 59.3%
+-commutative59.3%
associate-/l*90.2%
fma-define90.2%
Simplified90.2%
Taylor expanded in a around inf 52.0%
if -1.0500000000000001e149 < a < 7.1999999999999999e79Initial program 67.3%
+-commutative67.3%
associate-/l*81.6%
fma-define81.6%
Simplified81.6%
add-cube-cbrt81.2%
pow381.2%
Applied egg-rr81.2%
Taylor expanded in t around inf 44.6%
(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 64.5%
+-commutative64.5%
associate-/l*84.6%
fma-define84.6%
Simplified84.6%
Taylor expanded in a around inf 24.4%
(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 64.5%
+-commutative64.5%
associate-/l*84.6%
fma-define84.6%
Simplified84.6%
Taylor expanded in y around 0 32.7%
mul-1-neg32.7%
*-lft-identity32.7%
*-commutative32.7%
*-rgt-identity32.7%
times-frac39.2%
/-rgt-identity39.2%
distribute-lft-neg-out39.2%
mul-1-neg39.2%
distribute-rgt-in39.2%
mul-1-neg39.2%
unsub-neg39.2%
Simplified39.2%
Taylor expanded in t around inf 2.9%
Taylor expanded in x around 0 2.9%
(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 2024172
(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))))