
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x y) t)))
(if (<= t -6.6e+101)
(fma t_1 (- z a) y)
(if (<= t 1.4e+179)
(+ (/ (- y x) (/ (- a t) (- z t))) x)
(fma t_1 z y)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) / t;
double tmp;
if (t <= -6.6e+101) {
tmp = fma(t_1, (z - a), y);
} else if (t <= 1.4e+179) {
tmp = ((y - x) / ((a - t) / (z - t))) + x;
} else {
tmp = fma(t_1, z, y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) / t) tmp = 0.0 if (t <= -6.6e+101) tmp = fma(t_1, Float64(z - a), y); elseif (t <= 1.4e+179) tmp = Float64(Float64(Float64(y - x) / Float64(Float64(a - t) / Float64(z - t))) + x); else tmp = fma(t_1, z, y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -6.6e+101], N[(t$95$1 * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 1.4e+179], N[(N[(N[(y - x), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t$95$1 * z + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t}\\
\mathbf{if}\;t \leq -6.6 \cdot 10^{+101}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, z - a, y\right)\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+179}:\\
\;\;\;\;\frac{y - x}{\frac{a - t}{z - t}} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, z, y\right)\\
\end{array}
\end{array}
if t < -6.60000000000000022e101Initial program 30.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites90.0%
if -6.60000000000000022e101 < t < 1.4e179Initial program 85.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6492.6
Applied rewrites92.6%
if 1.4e179 < t Initial program 21.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites92.0%
Taylor expanded in a around 0
Applied rewrites92.3%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- x y) t) z)))
(if (<= t -6.2e+53)
y
(if (<= t -2.05e-171)
t_1
(if (<= t 5.8e+69) (fma (/ y a) z x) (if (<= t 1.15e+129) t_1 y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) / t) * z;
double tmp;
if (t <= -6.2e+53) {
tmp = y;
} else if (t <= -2.05e-171) {
tmp = t_1;
} else if (t <= 5.8e+69) {
tmp = fma((y / a), z, x);
} else if (t <= 1.15e+129) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) / t) * z) tmp = 0.0 if (t <= -6.2e+53) tmp = y; elseif (t <= -2.05e-171) tmp = t_1; elseif (t <= 5.8e+69) tmp = fma(Float64(y / a), z, x); elseif (t <= 1.15e+129) tmp = t_1; else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t, -6.2e+53], y, If[LessEqual[t, -2.05e-171], t$95$1, If[LessEqual[t, 5.8e+69], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[t, 1.15e+129], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t} \cdot z\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+53}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+69}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.20000000000000038e53 or 1.14999999999999995e129 < t Initial program 35.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6460.6
Applied rewrites60.6%
Taylor expanded in t around inf
Applied rewrites67.2%
if -6.20000000000000038e53 < t < -2.05e-171 or 5.7999999999999997e69 < t < 1.14999999999999995e129Initial program 83.5%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites64.0%
Taylor expanded in z around inf
Applied rewrites47.7%
if -2.05e-171 < t < 5.7999999999999997e69Initial program 87.1%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6468.3
Applied rewrites68.3%
Taylor expanded in x around 0
Applied rewrites56.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -2.6e+73)
t_1
(if (<= t -3.2e-68)
(+ (/ (* (- z t) y) (- a t)) x)
(if (<= t 290000.0) (+ (/ (* (- y x) z) (- a t)) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -2.6e+73) {
tmp = t_1;
} else if (t <= -3.2e-68) {
tmp = (((z - t) * y) / (a - t)) + x;
} else if (t <= 290000.0) {
tmp = (((y - x) * z) / (a - t)) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -2.6e+73) tmp = t_1; elseif (t <= -3.2e-68) tmp = Float64(Float64(Float64(Float64(z - t) * y) / Float64(a - t)) + x); elseif (t <= 290000.0) tmp = Float64(Float64(Float64(Float64(y - x) * z) / Float64(a - t)) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.6e+73], t$95$1, If[LessEqual[t, -3.2e-68], N[(N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 290000.0], N[(N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-68}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t} + x\\
\mathbf{elif}\;t \leq 290000:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.6000000000000001e73 or 2.9e5 < t Initial program 39.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites82.2%
if -2.6000000000000001e73 < t < -3.1999999999999999e-68Initial program 92.8%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f64N/A
lower--.f6482.8
Applied rewrites82.8%
if -3.1999999999999999e-68 < t < 2.9e5Initial program 89.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6482.2
Applied rewrites82.2%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x y) t)))
(if (<= t -2.4e+74)
(fma t_1 (- z a) y)
(if (<= t 1.75e+121)
(+ (/ (* (- z t) (- y x)) (- a t)) x)
(fma t_1 z y)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) / t;
double tmp;
if (t <= -2.4e+74) {
tmp = fma(t_1, (z - a), y);
} else if (t <= 1.75e+121) {
tmp = (((z - t) * (y - x)) / (a - t)) + x;
} else {
tmp = fma(t_1, z, y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) / t) tmp = 0.0 if (t <= -2.4e+74) tmp = fma(t_1, Float64(z - a), y); elseif (t <= 1.75e+121) tmp = Float64(Float64(Float64(Float64(z - t) * Float64(y - x)) / Float64(a - t)) + x); else tmp = fma(t_1, z, y); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -2.4e+74], N[(t$95$1 * N[(z - a), $MachinePrecision] + y), $MachinePrecision], If[LessEqual[t, 1.75e+121], N[(N[(N[(N[(z - t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t$95$1 * z + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y}{t}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, z - a, y\right)\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+121}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot \left(y - x\right)}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, z, y\right)\\
\end{array}
\end{array}
if t < -2.40000000000000008e74Initial program 32.4%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites88.8%
if -2.40000000000000008e74 < t < 1.75e121Initial program 87.1%
if 1.75e121 < t Initial program 27.0%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites90.4%
Taylor expanded in a around 0
Applied rewrites90.7%
Final simplification88.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y x) (/ a t) y)))
(if (<= t -300000000000.0)
t_1
(if (<= t -2.05e-171)
(* (/ (- x y) t) z)
(if (<= t 3.6e-19) (fma (/ y a) z x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - x), (a / t), y);
double tmp;
if (t <= -300000000000.0) {
tmp = t_1;
} else if (t <= -2.05e-171) {
tmp = ((x - y) / t) * z;
} else if (t <= 3.6e-19) {
tmp = fma((y / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - x), Float64(a / t), y) tmp = 0.0 if (t <= -300000000000.0) tmp = t_1; elseif (t <= -2.05e-171) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (t <= 3.6e-19) tmp = fma(Float64(y / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(a / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -300000000000.0], t$95$1, If[LessEqual[t, -2.05e-171], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 3.6e-19], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - x, \frac{a}{t}, y\right)\\
\mathbf{if}\;t \leq -300000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{-171}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3e11 or 3.6000000000000001e-19 < t Initial program 46.2%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites79.3%
Taylor expanded in z around 0
Applied rewrites60.4%
if -3e11 < t < -2.05e-171Initial program 90.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites65.5%
Taylor expanded in z around inf
Applied rewrites49.1%
if -2.05e-171 < t < 3.6000000000000001e-19Initial program 89.9%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.7
Applied rewrites72.7%
Taylor expanded in x around 0
Applied rewrites62.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y x) t) a y)))
(if (<= t -300000000000.0)
t_1
(if (<= t -2.05e-171)
(* (/ (- x y) t) z)
(if (<= t 6.5e-21) (fma (/ y a) z x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - x) / t), a, y);
double tmp;
if (t <= -300000000000.0) {
tmp = t_1;
} else if (t <= -2.05e-171) {
tmp = ((x - y) / t) * z;
} else if (t <= 6.5e-21) {
tmp = fma((y / a), z, x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - x) / t), a, y) tmp = 0.0 if (t <= -300000000000.0) tmp = t_1; elseif (t <= -2.05e-171) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (t <= 6.5e-21) tmp = fma(Float64(y / a), z, x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a + y), $MachinePrecision]}, If[LessEqual[t, -300000000000.0], t$95$1, If[LessEqual[t, -2.05e-171], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 6.5e-21], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\
\mathbf{if}\;t \leq -300000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{-171}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3e11 or 6.49999999999999987e-21 < t Initial program 46.2%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.5
Applied rewrites54.5%
Taylor expanded in a around 0
Applied rewrites60.4%
if -3e11 < t < -2.05e-171Initial program 90.3%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites65.5%
Taylor expanded in z around inf
Applied rewrites49.1%
if -2.05e-171 < t < 6.49999999999999987e-21Initial program 89.9%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6472.7
Applied rewrites72.7%
Taylor expanded in x around 0
Applied rewrites62.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x y) t) (- z a) y)))
(if (<= t -5.4e-75)
t_1
(if (<= t 290000.0) (+ (/ (* (- y x) z) (- a t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), (z - a), y);
double tmp;
if (t <= -5.4e-75) {
tmp = t_1;
} else if (t <= 290000.0) {
tmp = (((y - x) * z) / (a - t)) + x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), Float64(z - a), y) tmp = 0.0 if (t <= -5.4e-75) tmp = t_1; elseif (t <= 290000.0) tmp = Float64(Float64(Float64(Float64(y - x) * z) / Float64(a - t)) + x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -5.4e-75], t$95$1, If[LessEqual[t, 290000.0], N[(N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 290000:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t} + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.3999999999999996e-75 or 2.9e5 < t Initial program 51.8%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.5%
if -5.3999999999999996e-75 < t < 2.9e5Initial program 89.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f6482.1
Applied rewrites82.1%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.36e+63) (fma (- x y) (/ t (- a t)) x) (if (<= a 5.5e-7) (fma (/ (- x y) t) (- z a) y) (fma (- y x) (/ z a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.36e+63) {
tmp = fma((x - y), (t / (a - t)), x);
} else if (a <= 5.5e-7) {
tmp = fma(((x - y) / t), (z - a), y);
} else {
tmp = fma((y - x), (z / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.36e+63) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); elseif (a <= 5.5e-7) tmp = fma(Float64(Float64(x - y) / t), Float64(z - a), y); else tmp = fma(Float64(y - x), Float64(z / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.36e+63], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 5.5e-7], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * N[(z - a), $MachinePrecision] + y), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.36 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z - a, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\end{array}
\end{array}
if a < -1.36000000000000006e63Initial program 71.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.8
Applied rewrites79.8%
if -1.36000000000000006e63 < a < 5.5000000000000003e-7Initial program 67.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.7%
if 5.5000000000000003e-7 < a Initial program 65.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.3
Applied rewrites69.3%
Applied rewrites71.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.36e+63) (fma (- x y) (/ t (- a t)) x) (if (<= a 5.5e-7) (fma (/ (- x y) t) z y) (fma (- y x) (/ z a) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.36e+63) {
tmp = fma((x - y), (t / (a - t)), x);
} else if (a <= 5.5e-7) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = fma((y - x), (z / a), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.36e+63) tmp = fma(Float64(x - y), Float64(t / Float64(a - t)), x); elseif (a <= 5.5e-7) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = fma(Float64(y - x), Float64(z / a), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.36e+63], N[(N[(x - y), $MachinePrecision] * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 5.5e-7], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.36 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a - t}, x\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\end{array}
\end{array}
if a < -1.36000000000000006e63Initial program 71.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.8
Applied rewrites79.8%
if -1.36000000000000006e63 < a < 5.5000000000000003e-7Initial program 67.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.7%
Taylor expanded in a around 0
Applied rewrites74.7%
if 5.5000000000000003e-7 < a Initial program 65.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.3
Applied rewrites69.3%
Applied rewrites71.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma (/ (- x y) t) z y))) (if (<= t -9e-112) t_1 (if (<= t 2.9e+22) (fma (- y x) (/ z a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - y) / t), z, y);
double tmp;
if (t <= -9e-112) {
tmp = t_1;
} else if (t <= 2.9e+22) {
tmp = fma((y - x), (z / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - y) / t), z, y) tmp = 0.0 if (t <= -9e-112) tmp = t_1; elseif (t <= 2.9e+22) tmp = fma(Float64(y - x), Float64(z / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision]}, If[LessEqual[t, -9e-112], t$95$1, If[LessEqual[t, 2.9e+22], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.00000000000000024e-112 or 2.9e22 < t Initial program 53.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.8%
Taylor expanded in a around 0
Applied rewrites75.0%
if -9.00000000000000024e-112 < t < 2.9e22Initial program 88.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.3
Applied rewrites69.3%
Applied rewrites74.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e+63) (fma (- x y) (/ t a) x) (if (<= a 5.5e-7) (fma (/ (- x y) t) z y) (fma (/ y a) z x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+63) {
tmp = fma((x - y), (t / a), x);
} else if (a <= 5.5e-7) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = fma((y / a), z, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+63) tmp = fma(Float64(x - y), Float64(t / a), x); elseif (a <= 5.5e-7) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = fma(Float64(y / a), z, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+63], N[(N[(x - y), $MachinePrecision] * N[(t / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 5.5e-7], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(x - y, \frac{t}{a}, x\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\end{array}
\end{array}
if a < -1.39999999999999993e63Initial program 71.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.8
Applied rewrites79.8%
Taylor expanded in t around 0
Applied rewrites61.3%
if -1.39999999999999993e63 < a < 5.5000000000000003e-7Initial program 67.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.7%
Taylor expanded in a around 0
Applied rewrites74.7%
if 5.5000000000000003e-7 < a Initial program 65.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.3
Applied rewrites69.3%
Taylor expanded in x around 0
Applied rewrites57.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e+63) (fma (/ (- x y) a) t x) (if (<= a 5.5e-7) (fma (/ (- x y) t) z y) (fma (/ y a) z x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e+63) {
tmp = fma(((x - y) / a), t, x);
} else if (a <= 5.5e-7) {
tmp = fma(((x - y) / t), z, y);
} else {
tmp = fma((y / a), z, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e+63) tmp = fma(Float64(Float64(x - y) / a), t, x); elseif (a <= 5.5e-7) tmp = fma(Float64(Float64(x - y) / t), z, y); else tmp = fma(Float64(y / a), z, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e+63], N[(N[(N[(x - y), $MachinePrecision] / a), $MachinePrecision] * t + x), $MachinePrecision], If[LessEqual[a, 5.5e-7], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z + y), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{+63}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{a}, t, x\right)\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-7}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t}, z, y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\end{array}
\end{array}
if a < -1.39999999999999993e63Initial program 71.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6479.8
Applied rewrites79.8%
Taylor expanded in t around 0
Applied rewrites61.2%
if -1.39999999999999993e63 < a < 5.5000000000000003e-7Initial program 67.7%
Taylor expanded in t around inf
associate--l+N/A
distribute-lft-out--N/A
div-subN/A
+-commutativeN/A
mul-1-negN/A
div-subN/A
associate-/l*N/A
associate-/l*N/A
distribute-rgt-out--N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
Applied rewrites78.7%
Taylor expanded in a around 0
Applied rewrites74.7%
if 5.5000000000000003e-7 < a Initial program 65.0%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6469.3
Applied rewrites69.3%
Taylor expanded in x around 0
Applied rewrites57.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.5) y (if (<= t 4.3e-19) (fma (/ y a) z x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.5) {
tmp = y;
} else if (t <= 4.3e-19) {
tmp = fma((y / a), z, x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.5) tmp = y; elseif (t <= 4.3e-19) tmp = fma(Float64(y / a), z, x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.5], y, If[LessEqual[t, 4.3e-19], N[(N[(y / a), $MachinePrecision] * z + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.5 or 4.3e-19 < t Initial program 47.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6454.1
Applied rewrites54.1%
Taylor expanded in t around inf
Applied rewrites54.5%
if -6.5 < t < 4.3e-19Initial program 89.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f6463.0
Applied rewrites63.0%
Taylor expanded in x around 0
Applied rewrites51.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -5.5e+74) y (if (<= t 6.6e+122) (fma (- y) -1.0 x) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.5e+74) {
tmp = y;
} else if (t <= 6.6e+122) {
tmp = fma(-y, -1.0, x);
} else {
tmp = y;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.5e+74) tmp = y; elseif (t <= 6.6e+122) tmp = fma(Float64(-y), -1.0, x); else tmp = y; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.5e+74], y, If[LessEqual[t, 6.6e+122], N[((-y) * -1.0 + x), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+74}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(-y, -1, x\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -5.5000000000000003e74 or 6.5999999999999998e122 < t Initial program 29.4%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6457.2
Applied rewrites57.2%
Taylor expanded in t around inf
Applied rewrites66.4%
if -5.5000000000000003e74 < t < 6.5999999999999998e122Initial program 87.2%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6445.2
Applied rewrites45.2%
Taylor expanded in t around inf
Applied rewrites19.4%
Taylor expanded in t around inf
Applied rewrites15.3%
Taylor expanded in x around 0
Applied rewrites33.5%
(FPCore (x y z t a) :precision binary64 y)
double code(double x, double y, double z, double t, double a) {
return y;
}
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 = y
end function
public static double code(double x, double y, double z, double t, double a) {
return y;
}
def code(x, y, z, t, a): return y
function code(x, y, z, t, a) return y end
function tmp = code(x, y, z, t, a) tmp = y; end
code[x_, y_, z_, t_, a_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 67.8%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
+-commutativeN/A
distribute-neg-inN/A
unsub-negN/A
remove-double-negN/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6449.2
Applied rewrites49.2%
Taylor expanded in t around inf
Applied rewrites33.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 2024296
(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))))