
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 99.2%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z a)))))
(if (<= t -4.5e-74)
(+ x y)
(if (<= t 1.45e-92)
t_1
(if (<= t 4.5e-24) (- x (/ y (/ t z))) (if (<= t 49.0) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / a));
double tmp;
if (t <= -4.5e-74) {
tmp = x + y;
} else if (t <= 1.45e-92) {
tmp = t_1;
} else if (t <= 4.5e-24) {
tmp = x - (y / (t / z));
} else if (t <= 49.0) {
tmp = t_1;
} else {
tmp = x + 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / a))
if (t <= (-4.5d-74)) then
tmp = x + y
else if (t <= 1.45d-92) then
tmp = t_1
else if (t <= 4.5d-24) then
tmp = x - (y / (t / z))
else if (t <= 49.0d0) then
tmp = t_1
else
tmp = x + y
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 / a));
double tmp;
if (t <= -4.5e-74) {
tmp = x + y;
} else if (t <= 1.45e-92) {
tmp = t_1;
} else if (t <= 4.5e-24) {
tmp = x - (y / (t / z));
} else if (t <= 49.0) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / a)) tmp = 0 if t <= -4.5e-74: tmp = x + y elif t <= 1.45e-92: tmp = t_1 elif t <= 4.5e-24: tmp = x - (y / (t / z)) elif t <= 49.0: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / a))) tmp = 0.0 if (t <= -4.5e-74) tmp = Float64(x + y); elseif (t <= 1.45e-92) tmp = t_1; elseif (t <= 4.5e-24) tmp = Float64(x - Float64(y / Float64(t / z))); elseif (t <= 49.0) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / a)); tmp = 0.0; if (t <= -4.5e-74) tmp = x + y; elseif (t <= 1.45e-92) tmp = t_1; elseif (t <= 4.5e-24) tmp = x - (y / (t / z)); elseif (t <= 49.0) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e-74], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.45e-92], t$95$1, If[LessEqual[t, 4.5e-24], N[(x - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 49.0], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{a}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-74}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-24}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;t \leq 49:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -4.4999999999999999e-74 or 49 < t Initial program 99.9%
Taylor expanded in t around inf 81.2%
if -4.4999999999999999e-74 < t < 1.44999999999999992e-92 or 4.4999999999999997e-24 < t < 49Initial program 98.0%
Taylor expanded in t around 0 87.3%
if 1.44999999999999992e-92 < t < 4.4999999999999997e-24Initial program 99.6%
Taylor expanded in a around 0 89.7%
+-commutative89.7%
mul-1-neg89.7%
unsub-neg89.7%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in z around inf 66.8%
associate-/l*66.8%
Simplified66.8%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.3e+66) (not (<= t 5.5e+149))) (+ x y) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.3e+66) || !(t <= 5.5e+149)) {
tmp = x + y;
} else {
tmp = x + (y * (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 <= (-6.3d+66)) .or. (.not. (t <= 5.5d+149))) then
tmp = x + y
else
tmp = x + (y * (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 <= -6.3e+66) || !(t <= 5.5e+149)) {
tmp = x + y;
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.3e+66) or not (t <= 5.5e+149): tmp = x + y else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.3e+66) || !(t <= 5.5e+149)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.3e+66) || ~((t <= 5.5e+149))) tmp = x + y; else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.3e+66], N[Not[LessEqual[t, 5.5e+149]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.3 \cdot 10^{+66} \lor \neg \left(t \leq 5.5 \cdot 10^{+149}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -6.2999999999999998e66 or 5.49999999999999999e149 < t Initial program 100.0%
Taylor expanded in t around inf 88.0%
if -6.2999999999999998e66 < t < 5.49999999999999999e149Initial program 98.7%
Taylor expanded in z around inf 85.7%
Final simplification86.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.3e-24) (not (<= t 1.45e-92))) (+ x (- y (/ y (/ t z)))) (- x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.3e-24) || !(t <= 1.45e-92)) {
tmp = x + (y - (y / (t / z)));
} else {
tmp = x - (y * ((t - 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 <= (-1.3d-24)) .or. (.not. (t <= 1.45d-92))) then
tmp = x + (y - (y / (t / z)))
else
tmp = x - (y * ((t - 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 <= -1.3e-24) || !(t <= 1.45e-92)) {
tmp = x + (y - (y / (t / z)));
} else {
tmp = x - (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.3e-24) or not (t <= 1.45e-92): tmp = x + (y - (y / (t / z))) else: tmp = x - (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.3e-24) || !(t <= 1.45e-92)) tmp = Float64(x + Float64(y - Float64(y / Float64(t / z)))); else tmp = Float64(x - Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.3e-24) || ~((t <= 1.45e-92))) tmp = x + (y - (y / (t / z))); else tmp = x - (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.3e-24], N[Not[LessEqual[t, 1.45e-92]], $MachinePrecision]], N[(x + N[(y - N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-24} \lor \neg \left(t \leq 1.45 \cdot 10^{-92}\right):\\
\;\;\;\;x + \left(y - \frac{y}{\frac{t}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if t < -1.3e-24 or 1.44999999999999992e-92 < t Initial program 99.9%
Taylor expanded in a around 0 73.6%
+-commutative73.6%
mul-1-neg73.6%
unsub-neg73.6%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in z around 0 84.6%
mul-1-neg84.6%
unsub-neg84.6%
associate-/l*89.5%
Simplified89.5%
if -1.3e-24 < t < 1.44999999999999992e-92Initial program 98.0%
Taylor expanded in a around inf 90.2%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -3.8e-75) (+ x y) (if (<= t 3.5e-89) (+ x (* y (/ z a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e-75) {
tmp = x + y;
} else if (t <= 3.5e-89) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3.8d-75)) then
tmp = x + y
else if (t <= 3.5d-89) then
tmp = x + (y * (z / a))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e-75) {
tmp = x + y;
} else if (t <= 3.5e-89) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.8e-75: tmp = x + y elif t <= 3.5e-89: tmp = x + (y * (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e-75) tmp = Float64(x + y); elseif (t <= 3.5e-89) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.8e-75) tmp = x + y; elseif (t <= 3.5e-89) tmp = x + (y * (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e-75], N[(x + y), $MachinePrecision], If[LessEqual[t, 3.5e-89], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-75}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-89}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -3.79999999999999994e-75 or 3.4999999999999997e-89 < t Initial program 99.9%
Taylor expanded in t around inf 77.7%
if -3.79999999999999994e-75 < t < 3.4999999999999997e-89Initial program 97.9%
Taylor expanded in t around 0 85.8%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.5e+39) x (if (<= a 5.4e+51) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e+39) {
tmp = x;
} else if (a <= 5.4e+51) {
tmp = x + 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 <= (-5.5d+39)) then
tmp = x
else if (a <= 5.4d+51) then
tmp = x + 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 <= -5.5e+39) {
tmp = x;
} else if (a <= 5.4e+51) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e+39: tmp = x elif a <= 5.4e+51: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.5e+39) tmp = x; elseif (a <= 5.4e+51) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.5e+39) tmp = x; elseif (a <= 5.4e+51) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e+39], x, If[LessEqual[a, 5.4e+51], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{+51}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.4999999999999997e39 or 5.39999999999999983e51 < a Initial program 99.9%
Taylor expanded in x around inf 70.8%
if -5.4999999999999997e39 < a < 5.39999999999999983e51Initial program 98.7%
Taylor expanded in t around inf 65.8%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.5e+218) y (if (<= y 7.2e+188) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.5e+218) {
tmp = y;
} else if (y <= 7.2e+188) {
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 (y <= (-3.5d+218)) then
tmp = y
else if (y <= 7.2d+188) 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 (y <= -3.5e+218) {
tmp = y;
} else if (y <= 7.2e+188) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.5e+218: tmp = y elif y <= 7.2e+188: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.5e+218) tmp = y; elseif (y <= 7.2e+188) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.5e+218) tmp = y; elseif (y <= 7.2e+188) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.5e+218], y, If[LessEqual[y, 7.2e+188], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+218}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+188}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -3.50000000000000019e218 or 7.20000000000000041e188 < y Initial program 99.9%
Taylor expanded in x around 0 51.1%
Taylor expanded in t around inf 45.2%
if -3.50000000000000019e218 < y < 7.20000000000000041e188Initial program 99.0%
Taylor expanded in x around inf 59.2%
Final simplification56.8%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.2%
Taylor expanded in x around inf 51.1%
Final simplification51.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (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 - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (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 - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (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) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / 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 - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (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] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023196
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))