
(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 18 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 (if (or (<= t -2.35e+179) (not (<= t 1.25e+135))) (+ y (* x (/ (- z a) t))) (fma (- y x) (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.35e+179) || !(t <= 1.25e+135)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = fma((y - x), ((z - t) / (a - t)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.35e+179) || !(t <= 1.25e+135)) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); else tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.35e+179], N[Not[LessEqual[t, 1.25e+135]], $MachinePrecision]], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+179} \lor \neg \left(t \leq 1.25 \cdot 10^{+135}\right):\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\end{array}
\end{array}
if t < -2.35000000000000003e179 or 1.25000000000000007e135 < t Initial program 25.1%
+-commutative25.1%
associate-/l*55.9%
fma-define55.8%
Simplified55.8%
Taylor expanded in t around inf 55.9%
associate--l+55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
Simplified55.9%
Taylor expanded in x around inf 82.7%
div-sub82.7%
Simplified82.7%
if -2.35000000000000003e179 < t < 1.25000000000000007e135Initial program 83.8%
+-commutative83.8%
associate-/l*96.1%
fma-define96.1%
Simplified96.1%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z t) (/ y (- a t))))) (t_2 (+ y (* x (/ (- z a) t)))))
(if (<= t -1.25e+157)
t_2
(if (<= t -3.6e-24)
t_1
(if (<= t 4e+38)
(+ x (/ (* (- t z) (- x y)) (- a t)))
(if (<= t 5.6e+107) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - t) * (y / (a - t)));
double t_2 = y + (x * ((z - a) / t));
double tmp;
if (t <= -1.25e+157) {
tmp = t_2;
} else if (t <= -3.6e-24) {
tmp = t_1;
} else if (t <= 4e+38) {
tmp = x + (((t - z) * (x - y)) / (a - t));
} else if (t <= 5.6e+107) {
tmp = t_1;
} else {
tmp = t_2;
}
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 / (a - t)))
t_2 = y + (x * ((z - a) / t))
if (t <= (-1.25d+157)) then
tmp = t_2
else if (t <= (-3.6d-24)) then
tmp = t_1
else if (t <= 4d+38) then
tmp = x + (((t - z) * (x - y)) / (a - t))
else if (t <= 5.6d+107) then
tmp = t_1
else
tmp = t_2
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 / (a - t)));
double t_2 = y + (x * ((z - a) / t));
double tmp;
if (t <= -1.25e+157) {
tmp = t_2;
} else if (t <= -3.6e-24) {
tmp = t_1;
} else if (t <= 4e+38) {
tmp = x + (((t - z) * (x - y)) / (a - t));
} else if (t <= 5.6e+107) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - t) * (y / (a - t))) t_2 = y + (x * ((z - a) / t)) tmp = 0 if t <= -1.25e+157: tmp = t_2 elif t <= -3.6e-24: tmp = t_1 elif t <= 4e+38: tmp = x + (((t - z) * (x - y)) / (a - t)) elif t <= 5.6e+107: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))) t_2 = Float64(y + Float64(x * Float64(Float64(z - a) / t))) tmp = 0.0 if (t <= -1.25e+157) tmp = t_2; elseif (t <= -3.6e-24) tmp = t_1; elseif (t <= 4e+38) tmp = Float64(x + Float64(Float64(Float64(t - z) * Float64(x - y)) / Float64(a - t))); elseif (t <= 5.6e+107) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - t) * (y / (a - t))); t_2 = y + (x * ((z - a) / t)); tmp = 0.0; if (t <= -1.25e+157) tmp = t_2; elseif (t <= -3.6e-24) tmp = t_1; elseif (t <= 4e+38) tmp = x + (((t - z) * (x - y)) / (a - t)); elseif (t <= 5.6e+107) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e+157], t$95$2, If[LessEqual[t, -3.6e-24], t$95$1, If[LessEqual[t, 4e+38], N[(x + N[(N[(N[(t - z), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.6e+107], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - t\right) \cdot \frac{y}{a - t}\\
t_2 := y + x \cdot \frac{z - a}{t}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+157}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+38}:\\
\;\;\;\;x + \frac{\left(t - z\right) \cdot \left(x - y\right)}{a - t}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.24999999999999994e157 or 5.59999999999999969e107 < t Initial program 28.1%
+-commutative28.1%
associate-/l*59.8%
fma-define59.8%
Simplified59.8%
Taylor expanded in t around inf 56.1%
associate--l+56.1%
associate-*r/56.1%
associate-*r*56.1%
mul-1-neg56.1%
associate-*r/56.1%
associate-*r*56.1%
mul-1-neg56.1%
Simplified56.1%
Taylor expanded in x around inf 81.9%
div-sub81.9%
Simplified81.9%
if -1.24999999999999994e157 < t < -3.6000000000000001e-24 or 3.99999999999999991e38 < t < 5.59999999999999969e107Initial program 60.3%
Taylor expanded in y around inf 67.0%
*-commutative67.0%
*-lft-identity67.0%
times-frac90.7%
/-rgt-identity90.7%
Simplified90.7%
if -3.6000000000000001e-24 < t < 3.99999999999999991e38Initial program 92.7%
Final simplification89.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* x (/ (- z a) t)))))
(if (<= t -1.06e+156)
t_1
(if (<= t -3e-134)
(+ x (* (- z t) (/ y (- a t))))
(if (<= t 1.35e-136)
(+ x (* (- y x) (/ (- z t) a)))
(if (<= t 1.26e+109) (+ x (* z (/ (- y x) (- a t)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (x * ((z - a) / t));
double tmp;
if (t <= -1.06e+156) {
tmp = t_1;
} else if (t <= -3e-134) {
tmp = x + ((z - t) * (y / (a - t)));
} else if (t <= 1.35e-136) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 1.26e+109) {
tmp = x + (z * ((y - x) / (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 = y + (x * ((z - a) / t))
if (t <= (-1.06d+156)) then
tmp = t_1
else if (t <= (-3d-134)) then
tmp = x + ((z - t) * (y / (a - t)))
else if (t <= 1.35d-136) then
tmp = x + ((y - x) * ((z - t) / a))
else if (t <= 1.26d+109) then
tmp = x + (z * ((y - x) / (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 = y + (x * ((z - a) / t));
double tmp;
if (t <= -1.06e+156) {
tmp = t_1;
} else if (t <= -3e-134) {
tmp = x + ((z - t) * (y / (a - t)));
} else if (t <= 1.35e-136) {
tmp = x + ((y - x) * ((z - t) / a));
} else if (t <= 1.26e+109) {
tmp = x + (z * ((y - x) / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (x * ((z - a) / t)) tmp = 0 if t <= -1.06e+156: tmp = t_1 elif t <= -3e-134: tmp = x + ((z - t) * (y / (a - t))) elif t <= 1.35e-136: tmp = x + ((y - x) * ((z - t) / a)) elif t <= 1.26e+109: tmp = x + (z * ((y - x) / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(x * Float64(Float64(z - a) / t))) tmp = 0.0 if (t <= -1.06e+156) tmp = t_1; elseif (t <= -3e-134) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(a - t)))); elseif (t <= 1.35e-136) tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) / a))); elseif (t <= 1.26e+109) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (x * ((z - a) / t)); tmp = 0.0; if (t <= -1.06e+156) tmp = t_1; elseif (t <= -3e-134) tmp = x + ((z - t) * (y / (a - t))); elseif (t <= 1.35e-136) tmp = x + ((y - x) * ((z - t) / a)); elseif (t <= 1.26e+109) tmp = x + (z * ((y - x) / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.06e+156], t$95$1, If[LessEqual[t, -3e-134], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-136], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e+109], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + x \cdot \frac{z - a}{t}\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{+156}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-134}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-136}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z - t}{a}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{+109}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.05999999999999993e156 or 1.26e109 < t Initial program 28.1%
+-commutative28.1%
associate-/l*59.8%
fma-define59.8%
Simplified59.8%
Taylor expanded in t around inf 56.1%
associate--l+56.1%
associate-*r/56.1%
associate-*r*56.1%
mul-1-neg56.1%
associate-*r/56.1%
associate-*r*56.1%
mul-1-neg56.1%
Simplified56.1%
Taylor expanded in x around inf 81.9%
div-sub81.9%
Simplified81.9%
if -1.05999999999999993e156 < t < -3e-134Initial program 77.9%
Taylor expanded in y around inf 71.8%
*-commutative71.8%
*-lft-identity71.8%
times-frac82.4%
/-rgt-identity82.4%
Simplified82.4%
if -3e-134 < t < 1.3499999999999999e-136Initial program 91.4%
Taylor expanded in a around inf 86.7%
associate-/l*93.9%
Simplified93.9%
if 1.3499999999999999e-136 < t < 1.26e109Initial program 82.1%
Taylor expanded in z around inf 73.7%
associate-/l*78.9%
Simplified78.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= y -28.0)
t_1
(if (<= y -2.4e-167)
(+ x (* z (/ (- y x) a)))
(if (<= y -6.3e-285)
(* z (/ (- y x) (- a t)))
(if (<= y 4e+110) (+ x (/ (* z (- y x)) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -28.0) {
tmp = t_1;
} else if (y <= -2.4e-167) {
tmp = x + (z * ((y - x) / a));
} else if (y <= -6.3e-285) {
tmp = z * ((y - x) / (a - t));
} else if (y <= 4e+110) {
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 = y * ((z - t) / (a - t))
if (y <= (-28.0d0)) then
tmp = t_1
else if (y <= (-2.4d-167)) then
tmp = x + (z * ((y - x) / a))
else if (y <= (-6.3d-285)) then
tmp = z * ((y - x) / (a - t))
else if (y <= 4d+110) 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 = y * ((z - t) / (a - t));
double tmp;
if (y <= -28.0) {
tmp = t_1;
} else if (y <= -2.4e-167) {
tmp = x + (z * ((y - x) / a));
} else if (y <= -6.3e-285) {
tmp = z * ((y - x) / (a - t));
} else if (y <= 4e+110) {
tmp = x + ((z * (y - x)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if y <= -28.0: tmp = t_1 elif y <= -2.4e-167: tmp = x + (z * ((y - x) / a)) elif y <= -6.3e-285: tmp = z * ((y - x) / (a - t)) elif y <= 4e+110: tmp = x + ((z * (y - x)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -28.0) tmp = t_1; elseif (y <= -2.4e-167) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif (y <= -6.3e-285) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); elseif (y <= 4e+110) tmp = Float64(x + Float64(Float64(z * Float64(y - x)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (y <= -28.0) tmp = t_1; elseif (y <= -2.4e-167) tmp = x + (z * ((y - x) / a)); elseif (y <= -6.3e-285) tmp = z * ((y - x) / (a - t)); elseif (y <= 4e+110) 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[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -28.0], t$95$1, If[LessEqual[y, -2.4e-167], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.3e-285], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+110], N[(x + N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -28:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-167}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;y \leq -6.3 \cdot 10^{-285}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+110}:\\
\;\;\;\;x + \frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -28 or 4.0000000000000001e110 < y Initial program 60.1%
+-commutative60.1%
associate-/l*92.7%
fma-define92.7%
Simplified92.7%
clear-num92.6%
associate-/r/92.6%
Applied egg-rr92.6%
Taylor expanded in y around inf 82.3%
div-sub82.2%
Simplified82.2%
if -28 < y < -2.39999999999999993e-167Initial program 81.3%
Taylor expanded in t around 0 63.4%
associate-/l*68.6%
Simplified68.6%
if -2.39999999999999993e-167 < y < -6.29999999999999989e-285Initial program 61.2%
+-commutative61.2%
associate-/l*70.9%
fma-define70.8%
Simplified70.8%
clear-num70.8%
associate-/r/70.8%
Applied egg-rr70.8%
Taylor expanded in z around inf 61.8%
div-sub61.8%
Simplified61.8%
if -6.29999999999999989e-285 < y < 4.0000000000000001e110Initial program 72.5%
Taylor expanded in t around 0 60.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.7e+180) (not (<= t 1.25e+135))) (+ y (* x (/ (- z a) t))) (+ x (* (- z t) (* (- y x) (/ -1.0 (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.7e+180) || !(t <= 1.25e+135)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + ((z - t) * ((y - x) * (-1.0 / (t - 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 ((t <= (-1.7d+180)) .or. (.not. (t <= 1.25d+135))) then
tmp = y + (x * ((z - a) / t))
else
tmp = x + ((z - t) * ((y - x) * ((-1.0d0) / (t - a))))
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.7e+180) || !(t <= 1.25e+135)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + ((z - t) * ((y - x) * (-1.0 / (t - a))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.7e+180) or not (t <= 1.25e+135): tmp = y + (x * ((z - a) / t)) else: tmp = x + ((z - t) * ((y - x) * (-1.0 / (t - a)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.7e+180) || !(t <= 1.25e+135)) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) * Float64(-1.0 / Float64(t - a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.7e+180) || ~((t <= 1.25e+135))) tmp = y + (x * ((z - a) / t)); else tmp = x + ((z - t) * ((y - x) * (-1.0 / (t - a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.7e+180], N[Not[LessEqual[t, 1.25e+135]], $MachinePrecision]], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] * N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+180} \lor \neg \left(t \leq 1.25 \cdot 10^{+135}\right):\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \left(\left(y - x\right) \cdot \frac{-1}{t - a}\right)\\
\end{array}
\end{array}
if t < -1.69999999999999992e180 or 1.25000000000000007e135 < t Initial program 25.1%
+-commutative25.1%
associate-/l*55.9%
fma-define55.8%
Simplified55.8%
Taylor expanded in t around inf 55.9%
associate--l+55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
Simplified55.9%
Taylor expanded in x around inf 82.7%
div-sub82.7%
Simplified82.7%
if -1.69999999999999992e180 < t < 1.25000000000000007e135Initial program 83.8%
div-inv83.8%
*-commutative83.8%
associate-*l*92.6%
Applied egg-rr92.6%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) a)))))
(if (<= a -2.5e+99)
t_1
(if (<= a -1.8e-96)
(* y (/ (- z t) (- a t)))
(if (<= a 6.7e-38) (* z (/ (- y x) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / a));
double tmp;
if (a <= -2.5e+99) {
tmp = t_1;
} else if (a <= -1.8e-96) {
tmp = y * ((z - t) / (a - t));
} else if (a <= 6.7e-38) {
tmp = z * ((y - x) / (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 + (y * ((z - t) / a))
if (a <= (-2.5d+99)) then
tmp = t_1
else if (a <= (-1.8d-96)) then
tmp = y * ((z - t) / (a - t))
else if (a <= 6.7d-38) then
tmp = z * ((y - x) / (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 + (y * ((z - t) / a));
double tmp;
if (a <= -2.5e+99) {
tmp = t_1;
} else if (a <= -1.8e-96) {
tmp = y * ((z - t) / (a - t));
} else if (a <= 6.7e-38) {
tmp = z * ((y - x) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / a)) tmp = 0 if a <= -2.5e+99: tmp = t_1 elif a <= -1.8e-96: tmp = y * ((z - t) / (a - t)) elif a <= 6.7e-38: tmp = z * ((y - x) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / a))) tmp = 0.0 if (a <= -2.5e+99) tmp = t_1; elseif (a <= -1.8e-96) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (a <= 6.7e-38) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / a)); tmp = 0.0; if (a <= -2.5e+99) tmp = t_1; elseif (a <= -1.8e-96) tmp = y * ((z - t) / (a - t)); elseif (a <= 6.7e-38) tmp = z * ((y - x) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e+99], t$95$1, If[LessEqual[a, -1.8e-96], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.7e-38], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a}\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-96}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;a \leq 6.7 \cdot 10^{-38}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.50000000000000004e99 or 6.7000000000000004e-38 < a Initial program 65.6%
Taylor expanded in a around inf 60.2%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in y around inf 60.0%
associate-/l*70.8%
Simplified70.8%
if -2.50000000000000004e99 < a < -1.80000000000000004e-96Initial program 69.9%
+-commutative69.9%
associate-/l*90.3%
fma-define90.3%
Simplified90.3%
clear-num90.4%
associate-/r/90.4%
Applied egg-rr90.4%
Taylor expanded in y around inf 61.6%
div-sub61.6%
Simplified61.6%
if -1.80000000000000004e-96 < a < 6.7000000000000004e-38Initial program 68.2%
+-commutative68.2%
associate-/l*76.7%
fma-define76.7%
Simplified76.7%
clear-num76.6%
associate-/r/76.6%
Applied egg-rr76.6%
Taylor expanded in z around inf 63.3%
div-sub63.3%
Simplified63.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= y -11.8)
t_1
(if (<= y 1.65e-85)
(- x (/ (* x z) a))
(if (<= y 1.45e+71) (* z (/ (- y x) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (y <= -11.8) {
tmp = t_1;
} else if (y <= 1.65e-85) {
tmp = x - ((x * z) / a);
} else if (y <= 1.45e+71) {
tmp = z * ((y - x) / (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 = y * ((z - t) / (a - t))
if (y <= (-11.8d0)) then
tmp = t_1
else if (y <= 1.65d-85) then
tmp = x - ((x * z) / a)
else if (y <= 1.45d+71) then
tmp = z * ((y - x) / (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 = y * ((z - t) / (a - t));
double tmp;
if (y <= -11.8) {
tmp = t_1;
} else if (y <= 1.65e-85) {
tmp = x - ((x * z) / a);
} else if (y <= 1.45e+71) {
tmp = z * ((y - x) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if y <= -11.8: tmp = t_1 elif y <= 1.65e-85: tmp = x - ((x * z) / a) elif y <= 1.45e+71: tmp = z * ((y - x) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (y <= -11.8) tmp = t_1; elseif (y <= 1.65e-85) tmp = Float64(x - Float64(Float64(x * z) / a)); elseif (y <= 1.45e+71) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (y <= -11.8) tmp = t_1; elseif (y <= 1.65e-85) tmp = x - ((x * z) / a); elseif (y <= 1.45e+71) tmp = z * ((y - x) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -11.8], t$95$1, If[LessEqual[y, 1.65e-85], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+71], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y \leq -11.8:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-85}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+71}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -11.800000000000001 or 1.45000000000000004e71 < y Initial program 58.8%
+-commutative58.8%
associate-/l*92.1%
fma-define92.1%
Simplified92.1%
clear-num92.0%
associate-/r/92.0%
Applied egg-rr92.0%
Taylor expanded in y around inf 80.2%
div-sub80.2%
Simplified80.2%
if -11.800000000000001 < y < 1.64999999999999986e-85Initial program 72.9%
Taylor expanded in a around inf 57.2%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in y around 0 54.0%
mul-1-neg54.0%
unsub-neg54.0%
associate-/l*58.4%
Simplified58.4%
Taylor expanded in z around inf 55.3%
if 1.64999999999999986e-85 < y < 1.45000000000000004e71Initial program 77.6%
+-commutative77.6%
associate-/l*82.1%
fma-define82.1%
Simplified82.1%
clear-num82.1%
associate-/r/82.2%
Applied egg-rr82.2%
Taylor expanded in z around inf 60.9%
div-sub60.9%
Simplified60.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.25e+133) (not (<= t 2.95e+110))) (+ y (* x (/ (- z a) t))) (+ x (* z (/ (- y x) (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.25e+133) || !(t <= 2.95e+110)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + (z * ((y - x) / (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 <= (-2.25d+133)) .or. (.not. (t <= 2.95d+110))) then
tmp = y + (x * ((z - a) / t))
else
tmp = x + (z * ((y - x) / (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 <= -2.25e+133) || !(t <= 2.95e+110)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + (z * ((y - x) / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.25e+133) or not (t <= 2.95e+110): tmp = y + (x * ((z - a) / t)) else: tmp = x + (z * ((y - x) / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.25e+133) || !(t <= 2.95e+110)) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.25e+133) || ~((t <= 2.95e+110))) tmp = y + (x * ((z - a) / t)); else tmp = x + (z * ((y - x) / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.25e+133], N[Not[LessEqual[t, 2.95e+110]], $MachinePrecision]], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{+133} \lor \neg \left(t \leq 2.95 \cdot 10^{+110}\right):\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a - t}\\
\end{array}
\end{array}
if t < -2.24999999999999992e133 or 2.9499999999999999e110 < t Initial program 27.5%
+-commutative27.5%
associate-/l*60.8%
fma-define60.8%
Simplified60.8%
Taylor expanded in t around inf 55.9%
associate--l+55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
Simplified55.9%
Taylor expanded in x around inf 81.2%
div-sub81.2%
Simplified81.2%
if -2.24999999999999992e133 < t < 2.9499999999999999e110Initial program 85.7%
Taylor expanded in z around inf 77.2%
associate-/l*80.4%
Simplified80.4%
Final simplification80.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.25e+130) (not (<= t 1.75e+105))) (+ y (* x (/ (- z a) t))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.25e+130) || !(t <= 1.75e+105)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + (z * ((y - x) / 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 ((t <= (-1.25d+130)) .or. (.not. (t <= 1.75d+105))) then
tmp = y + (x * ((z - a) / t))
else
tmp = x + (z * ((y - x) / a))
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.25e+130) || !(t <= 1.75e+105)) {
tmp = y + (x * ((z - a) / t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.25e+130) or not (t <= 1.75e+105): tmp = y + (x * ((z - a) / t)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.25e+130) || !(t <= 1.75e+105)) tmp = Float64(y + Float64(x * Float64(Float64(z - a) / t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.25e+130) || ~((t <= 1.75e+105))) tmp = y + (x * ((z - a) / t)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.25e+130], N[Not[LessEqual[t, 1.75e+105]], $MachinePrecision]], N[(y + N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{+130} \lor \neg \left(t \leq 1.75 \cdot 10^{+105}\right):\\
\;\;\;\;y + x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if t < -1.2499999999999999e130 or 1.74999999999999996e105 < t Initial program 27.5%
+-commutative27.5%
associate-/l*60.8%
fma-define60.8%
Simplified60.8%
Taylor expanded in t around inf 55.9%
associate--l+55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
associate-*r/55.9%
associate-*r*55.9%
mul-1-neg55.9%
Simplified55.9%
Taylor expanded in x around inf 81.2%
div-sub81.2%
Simplified81.2%
if -1.2499999999999999e130 < t < 1.74999999999999996e105Initial program 85.7%
Taylor expanded in t around 0 66.1%
associate-/l*68.5%
Simplified68.5%
Final simplification72.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -195.0) (not (<= y 6.8e+112))) (* y (/ (- z t) (- a t))) (+ x (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -195.0) || !(y <= 6.8e+112)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / 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 ((y <= (-195.0d0)) .or. (.not. (y <= 6.8d+112))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x + (z * ((y - x) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -195.0) || !(y <= 6.8e+112)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x + (z * ((y - x) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -195.0) or not (y <= 6.8e+112): tmp = y * ((z - t) / (a - t)) else: tmp = x + (z * ((y - x) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -195.0) || !(y <= 6.8e+112)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -195.0) || ~((y <= 6.8e+112))) tmp = y * ((z - t) / (a - t)); else tmp = x + (z * ((y - x) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -195.0], N[Not[LessEqual[y, 6.8e+112]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -195 \lor \neg \left(y \leq 6.8 \cdot 10^{+112}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\end{array}
\end{array}
if y < -195 or 6.79999999999999987e112 < y Initial program 60.6%
+-commutative60.6%
associate-/l*92.6%
fma-define92.6%
Simplified92.6%
clear-num92.6%
associate-/r/92.6%
Applied egg-rr92.6%
Taylor expanded in y around inf 82.1%
div-sub82.1%
Simplified82.1%
if -195 < y < 6.79999999999999987e112Initial program 71.9%
Taylor expanded in t around 0 56.3%
associate-/l*57.0%
Simplified57.0%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -53.0) (not (<= y 1.2e-84))) (* y (/ (- z t) (- a t))) (- x (/ (* x z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -53.0) || !(y <= 1.2e-84)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((x * 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 ((y <= (-53.0d0)) .or. (.not. (y <= 1.2d-84))) then
tmp = y * ((z - t) / (a - t))
else
tmp = x - ((x * 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 ((y <= -53.0) || !(y <= 1.2e-84)) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -53.0) or not (y <= 1.2e-84): tmp = y * ((z - t) / (a - t)) else: tmp = x - ((x * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -53.0) || !(y <= 1.2e-84)) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = Float64(x - Float64(Float64(x * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -53.0) || ~((y <= 1.2e-84))) tmp = y * ((z - t) / (a - t)); else tmp = x - ((x * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -53.0], N[Not[LessEqual[y, 1.2e-84]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -53 \lor \neg \left(y \leq 1.2 \cdot 10^{-84}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\end{array}
\end{array}
if y < -53 or 1.20000000000000009e-84 < y Initial program 62.0%
+-commutative62.0%
associate-/l*90.4%
fma-define90.4%
Simplified90.4%
clear-num90.3%
associate-/r/90.3%
Applied egg-rr90.3%
Taylor expanded in y around inf 73.9%
div-sub73.9%
Simplified73.9%
if -53 < y < 1.20000000000000009e-84Initial program 72.9%
Taylor expanded in a around inf 57.2%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in y around 0 54.0%
mul-1-neg54.0%
unsub-neg54.0%
associate-/l*58.4%
Simplified58.4%
Taylor expanded in z around inf 55.3%
Final simplification64.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.5e+89) (not (<= t 8.5e+81))) (* y (/ t (- t a))) (- x (/ (* x z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.5e+89) || !(t <= 8.5e+81)) {
tmp = y * (t / (t - a));
} else {
tmp = x - ((x * 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 ((t <= (-4.5d+89)) .or. (.not. (t <= 8.5d+81))) then
tmp = y * (t / (t - a))
else
tmp = x - ((x * 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 ((t <= -4.5e+89) || !(t <= 8.5e+81)) {
tmp = y * (t / (t - a));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.5e+89) or not (t <= 8.5e+81): tmp = y * (t / (t - a)) else: tmp = x - ((x * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.5e+89) || !(t <= 8.5e+81)) tmp = Float64(y * Float64(t / Float64(t - a))); else tmp = Float64(x - Float64(Float64(x * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.5e+89) || ~((t <= 8.5e+81))) tmp = y * (t / (t - a)); else tmp = x - ((x * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.5e+89], N[Not[LessEqual[t, 8.5e+81]], $MachinePrecision]], N[(y * N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+89} \lor \neg \left(t \leq 8.5 \cdot 10^{+81}\right):\\
\;\;\;\;y \cdot \frac{t}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\end{array}
\end{array}
if t < -4.5e89 or 8.49999999999999986e81 < t Initial program 30.7%
+-commutative30.7%
associate-/l*64.8%
fma-define64.8%
Simplified64.8%
clear-num64.7%
associate-/r/64.8%
Applied egg-rr64.8%
Taylor expanded in y around inf 57.2%
div-sub57.2%
Simplified57.2%
Taylor expanded in z around 0 51.7%
neg-mul-151.7%
Simplified51.7%
if -4.5e89 < t < 8.49999999999999986e81Initial program 88.2%
Taylor expanded in a around inf 71.0%
associate-/l*77.3%
Simplified77.3%
Taylor expanded in y around 0 54.0%
mul-1-neg54.0%
unsub-neg54.0%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in z around inf 55.0%
Final simplification53.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -245.0) (not (<= y 7.5e+116))) (* y (- 1.0 (/ z t))) (- x (/ (* x z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -245.0) || !(y <= 7.5e+116)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x - ((x * 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 ((y <= (-245.0d0)) .or. (.not. (y <= 7.5d+116))) then
tmp = y * (1.0d0 - (z / t))
else
tmp = x - ((x * 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 ((y <= -245.0) || !(y <= 7.5e+116)) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x - ((x * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -245.0) or not (y <= 7.5e+116): tmp = y * (1.0 - (z / t)) else: tmp = x - ((x * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -245.0) || !(y <= 7.5e+116)) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = Float64(x - Float64(Float64(x * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -245.0) || ~((y <= 7.5e+116))) tmp = y * (1.0 - (z / t)); else tmp = x - ((x * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -245.0], N[Not[LessEqual[y, 7.5e+116]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -245 \lor \neg \left(y \leq 7.5 \cdot 10^{+116}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot z}{a}\\
\end{array}
\end{array}
if y < -245 or 7.5e116 < y Initial program 61.1%
+-commutative61.1%
associate-/l*92.6%
fma-define92.6%
Simplified92.6%
Taylor expanded in y around inf 82.3%
Taylor expanded in a around 0 55.9%
mul-1-neg55.9%
unsub-neg55.9%
Simplified55.9%
if -245 < y < 7.5e116Initial program 71.5%
Taylor expanded in a around inf 53.7%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in y around 0 49.0%
mul-1-neg49.0%
unsub-neg49.0%
associate-/l*54.0%
Simplified54.0%
Taylor expanded in z around inf 51.5%
Final simplification53.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.65e+99) (- x (/ (* t x) a)) (if (<= a 0.007) (* y (- 1.0 (/ z t))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.65e+99) {
tmp = x - ((t * x) / a);
} else if (a <= 0.007) {
tmp = y * (1.0 - (z / t));
} 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 <= (-3.65d+99)) then
tmp = x - ((t * x) / a)
else if (a <= 0.007d0) then
tmp = y * (1.0d0 - (z / t))
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 <= -3.65e+99) {
tmp = x - ((t * x) / a);
} else if (a <= 0.007) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.65e+99: tmp = x - ((t * x) / a) elif a <= 0.007: tmp = y * (1.0 - (z / t)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.65e+99) tmp = Float64(x - Float64(Float64(t * x) / a)); elseif (a <= 0.007) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.65e+99) tmp = x - ((t * x) / a); elseif (a <= 0.007) tmp = y * (1.0 - (z / t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.65e+99], N[(x - N[(N[(t * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.007], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.65 \cdot 10^{+99}:\\
\;\;\;\;x - \frac{t \cdot x}{a}\\
\mathbf{elif}\;a \leq 0.007:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.6499999999999999e99Initial program 68.6%
Taylor expanded in a around inf 62.4%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in y around 0 57.1%
mul-1-neg57.1%
unsub-neg57.1%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in z around 0 55.7%
neg-mul-116.5%
Simplified55.7%
associate-*r/57.2%
add-sqr-sqrt29.2%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod26.2%
add-sqr-sqrt57.4%
Applied egg-rr57.4%
if -3.6499999999999999e99 < a < 0.00700000000000000015Initial program 68.2%
+-commutative68.2%
associate-/l*79.8%
fma-define79.8%
Simplified79.8%
Taylor expanded in y around inf 54.7%
Taylor expanded in a around 0 48.5%
mul-1-neg48.5%
unsub-neg48.5%
Simplified48.5%
if 0.00700000000000000015 < a Initial program 64.6%
+-commutative64.6%
associate-/l*93.0%
fma-define93.0%
Simplified93.0%
Taylor expanded in a around inf 46.6%
Final simplification49.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.5e+99) x (if (<= a 0.016) (* y (- 1.0 (/ z t))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e+99) {
tmp = x;
} else if (a <= 0.016) {
tmp = y * (1.0 - (z / t));
} 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 <= (-2.5d+99)) then
tmp = x
else if (a <= 0.016d0) then
tmp = y * (1.0d0 - (z / t))
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 <= -2.5e+99) {
tmp = x;
} else if (a <= 0.016) {
tmp = y * (1.0 - (z / t));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e+99: tmp = x elif a <= 0.016: tmp = y * (1.0 - (z / t)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e+99) tmp = x; elseif (a <= 0.016) tmp = Float64(y * Float64(1.0 - Float64(z / t))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.5e+99) tmp = x; elseif (a <= 0.016) tmp = y * (1.0 - (z / t)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+99], x, If[LessEqual[a, 0.016], N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 0.016:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.50000000000000004e99 or 0.016 < a Initial program 66.1%
+-commutative66.1%
associate-/l*91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in a around inf 50.2%
if -2.50000000000000004e99 < a < 0.016Initial program 68.2%
+-commutative68.2%
associate-/l*79.8%
fma-define79.8%
Simplified79.8%
Taylor expanded in y around inf 54.7%
Taylor expanded in a around 0 48.5%
mul-1-neg48.5%
unsub-neg48.5%
Simplified48.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -2e+136) y (if (<= t 4.5e+105) (* x (+ (/ t a) 1.0)) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+136) {
tmp = y;
} else if (t <= 4.5e+105) {
tmp = x * ((t / a) + 1.0);
} 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+136)) then
tmp = y
else if (t <= 4.5d+105) then
tmp = x * ((t / a) + 1.0d0)
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+136) {
tmp = y;
} else if (t <= 4.5e+105) {
tmp = x * ((t / a) + 1.0);
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+136: tmp = y elif t <= 4.5e+105: tmp = x * ((t / a) + 1.0) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+136) tmp = y; elseif (t <= 4.5e+105) tmp = Float64(x * Float64(Float64(t / a) + 1.0)); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e+136) tmp = y; elseif (t <= 4.5e+105) tmp = x * ((t / a) + 1.0); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+136], y, If[LessEqual[t, 4.5e+105], N[(x * N[(N[(t / a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+136}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+105}:\\
\;\;\;\;x \cdot \left(\frac{t}{a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.00000000000000012e136 or 4.5000000000000001e105 < t Initial program 27.5%
+-commutative27.5%
associate-/l*60.8%
fma-define60.8%
Simplified60.8%
clear-num60.7%
associate-/r/60.8%
Applied egg-rr60.8%
Taylor expanded in t around inf 46.6%
if -2.00000000000000012e136 < t < 4.5000000000000001e105Initial program 85.7%
Taylor expanded in a around inf 68.0%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in y around 0 52.1%
mul-1-neg52.1%
unsub-neg52.1%
associate-/l*57.0%
Simplified57.0%
Taylor expanded in z around 0 39.5%
neg-mul-114.2%
Simplified39.5%
Taylor expanded in x around 0 39.5%
cancel-sign-sub-inv39.5%
metadata-eval39.5%
*-lft-identity39.5%
Simplified39.5%
Final simplification41.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.2e+135) y (if (<= t 1.75e+105) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.2e+135) {
tmp = y;
} else if (t <= 1.75e+105) {
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 <= (-5.2d+135)) then
tmp = y
else if (t <= 1.75d+105) 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 <= -5.2e+135) {
tmp = y;
} else if (t <= 1.75e+105) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.2e+135: tmp = y elif t <= 1.75e+105: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.2e+135) tmp = y; elseif (t <= 1.75e+105) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.2e+135) tmp = y; elseif (t <= 1.75e+105) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.2e+135], y, If[LessEqual[t, 1.75e+105], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+135}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+105}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.2e135 or 1.74999999999999996e105 < t Initial program 27.5%
+-commutative27.5%
associate-/l*60.8%
fma-define60.8%
Simplified60.8%
clear-num60.7%
associate-/r/60.8%
Applied egg-rr60.8%
Taylor expanded in t around inf 46.6%
if -5.2e135 < t < 1.74999999999999996e105Initial program 85.7%
+-commutative85.7%
associate-/l*95.9%
fma-define95.9%
Simplified95.9%
Taylor expanded in a around inf 37.1%
(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 67.3%
+-commutative67.3%
associate-/l*84.8%
fma-define84.8%
Simplified84.8%
Taylor expanded in a around inf 27.5%
(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 2024132
(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))))