
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (sqrt (* z 2.0)) (- (* x 0.5) y))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (sqrt((z * 2.0)) * ((x * 0.5) - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = exp(((t * t) / 2.0d0)) * (sqrt((z * 2.0d0)) * ((x * 0.5d0) - y))
end function
public static double code(double x, double y, double z, double t) {
return Math.exp(((t * t) / 2.0)) * (Math.sqrt((z * 2.0)) * ((x * 0.5) - y));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (math.sqrt((z * 2.0)) * ((x * 0.5) - y))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (sqrt((z * 2.0)) * ((x * 0.5) - y)); end
code[x_, y_, z_, t_] := N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 1.9e-5)
(* t_1 (- (* x 0.5) y))
(if (<= t 9.5e+87)
(* y (* t_1 (+ -1.0 (* 0.5 (/ x y)))))
(if (<= t 1.46e+197)
(* t_1 (* x (+ 0.5 (* (pow t 2.0) 0.25))))
(* t_1 (* y (+ (* -0.5 (pow t 2.0)) -1.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 1.9e-5) {
tmp = t_1 * ((x * 0.5) - y);
} else if (t <= 9.5e+87) {
tmp = y * (t_1 * (-1.0 + (0.5 * (x / y))));
} else if (t <= 1.46e+197) {
tmp = t_1 * (x * (0.5 + (pow(t, 2.0) * 0.25)));
} else {
tmp = t_1 * (y * ((-0.5 * pow(t, 2.0)) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 1.9d-5) then
tmp = t_1 * ((x * 0.5d0) - y)
else if (t <= 9.5d+87) then
tmp = y * (t_1 * ((-1.0d0) + (0.5d0 * (x / y))))
else if (t <= 1.46d+197) then
tmp = t_1 * (x * (0.5d0 + ((t ** 2.0d0) * 0.25d0)))
else
tmp = t_1 * (y * (((-0.5d0) * (t ** 2.0d0)) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 1.9e-5) {
tmp = t_1 * ((x * 0.5) - y);
} else if (t <= 9.5e+87) {
tmp = y * (t_1 * (-1.0 + (0.5 * (x / y))));
} else if (t <= 1.46e+197) {
tmp = t_1 * (x * (0.5 + (Math.pow(t, 2.0) * 0.25)));
} else {
tmp = t_1 * (y * ((-0.5 * Math.pow(t, 2.0)) + -1.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 1.9e-5: tmp = t_1 * ((x * 0.5) - y) elif t <= 9.5e+87: tmp = y * (t_1 * (-1.0 + (0.5 * (x / y)))) elif t <= 1.46e+197: tmp = t_1 * (x * (0.5 + (math.pow(t, 2.0) * 0.25))) else: tmp = t_1 * (y * ((-0.5 * math.pow(t, 2.0)) + -1.0)) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 1.9e-5) tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y)); elseif (t <= 9.5e+87) tmp = Float64(y * Float64(t_1 * Float64(-1.0 + Float64(0.5 * Float64(x / y))))); elseif (t <= 1.46e+197) tmp = Float64(t_1 * Float64(x * Float64(0.5 + Float64((t ^ 2.0) * 0.25)))); else tmp = Float64(t_1 * Float64(y * Float64(Float64(-0.5 * (t ^ 2.0)) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 1.9e-5) tmp = t_1 * ((x * 0.5) - y); elseif (t <= 9.5e+87) tmp = y * (t_1 * (-1.0 + (0.5 * (x / y)))); elseif (t <= 1.46e+197) tmp = t_1 * (x * (0.5 + ((t ^ 2.0) * 0.25))); else tmp = t_1 * (y * ((-0.5 * (t ^ 2.0)) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.9e-5], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+87], N[(y * N[(t$95$1 * N[(-1.0 + N[(0.5 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.46e+197], N[(t$95$1 * N[(x * N[(0.5 + N[(N[Power[t, 2.0], $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y * N[(N[(-0.5 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 1.9 \cdot 10^{-5}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+87}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{+197}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 + {t}^{2} \cdot 0.25\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(-0.5 \cdot {t}^{2} + -1\right)\right)\\
\end{array}
\end{array}
if t < 1.9000000000000001e-5Initial program 99.7%
Taylor expanded in t around 0 76.1%
add-cube-cbrt75.5%
pow375.5%
Applied egg-rr75.5%
Taylor expanded in x around 0 74.1%
associate-*r*74.1%
rem-cube-cbrt74.8%
*-commutative74.8%
neg-mul-174.8%
associate-*r*74.8%
rem-cube-cbrt75.6%
*-commutative75.6%
distribute-rgt-in76.1%
*-commutative76.1%
+-commutative76.1%
sub-neg76.1%
Simplified76.1%
if 1.9000000000000001e-5 < t < 9.4999999999999992e87Initial program 100.0%
Taylor expanded in t around 0 27.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr27.0%
Taylor expanded in y around inf 53.1%
Simplified53.1%
if 9.4999999999999992e87 < t < 1.46e197Initial program 100.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 75.5%
Simplified75.5%
Taylor expanded in x around inf 52.9%
*-commutative52.9%
Simplified52.9%
if 1.46e197 < t Initial program 100.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 100.0%
Simplified100.0%
Taylor expanded in y around inf 85.7%
Final simplification72.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 0.14)
(* t_1 (- (* x 0.5) y))
(if (<= t 2.85e+197)
(* (exp (/ (* t t) 2.0)) (* x (* 0.5 t_1)))
(* t_1 (* y (+ (* -0.5 (pow t 2.0)) -1.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 0.14) {
tmp = t_1 * ((x * 0.5) - y);
} else if (t <= 2.85e+197) {
tmp = exp(((t * t) / 2.0)) * (x * (0.5 * t_1));
} else {
tmp = t_1 * (y * ((-0.5 * pow(t, 2.0)) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 0.14d0) then
tmp = t_1 * ((x * 0.5d0) - y)
else if (t <= 2.85d+197) then
tmp = exp(((t * t) / 2.0d0)) * (x * (0.5d0 * t_1))
else
tmp = t_1 * (y * (((-0.5d0) * (t ** 2.0d0)) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 0.14) {
tmp = t_1 * ((x * 0.5) - y);
} else if (t <= 2.85e+197) {
tmp = Math.exp(((t * t) / 2.0)) * (x * (0.5 * t_1));
} else {
tmp = t_1 * (y * ((-0.5 * Math.pow(t, 2.0)) + -1.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 0.14: tmp = t_1 * ((x * 0.5) - y) elif t <= 2.85e+197: tmp = math.exp(((t * t) / 2.0)) * (x * (0.5 * t_1)) else: tmp = t_1 * (y * ((-0.5 * math.pow(t, 2.0)) + -1.0)) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 0.14) tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y)); elseif (t <= 2.85e+197) tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(x * Float64(0.5 * t_1))); else tmp = Float64(t_1 * Float64(y * Float64(Float64(-0.5 * (t ^ 2.0)) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 0.14) tmp = t_1 * ((x * 0.5) - y); elseif (t <= 2.85e+197) tmp = exp(((t * t) / 2.0)) * (x * (0.5 * t_1)); else tmp = t_1 * (y * ((-0.5 * (t ^ 2.0)) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.14], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.85e+197], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(x * N[(0.5 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(y * N[(N[(-0.5 * N[Power[t, 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 0.14:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{+197}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(x \cdot \left(0.5 \cdot t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(-0.5 \cdot {t}^{2} + -1\right)\right)\\
\end{array}
\end{array}
if t < 0.14000000000000001Initial program 99.7%
Taylor expanded in t around 0 75.9%
add-cube-cbrt75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in x around 0 73.9%
associate-*r*73.9%
rem-cube-cbrt74.6%
*-commutative74.6%
neg-mul-174.6%
associate-*r*74.6%
rem-cube-cbrt75.3%
*-commutative75.3%
distribute-rgt-in75.9%
*-commutative75.9%
+-commutative75.9%
sub-neg75.9%
Simplified75.9%
if 0.14000000000000001 < t < 2.85000000000000011e197Initial program 100.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 75.0%
associate-*l*75.0%
*-commutative75.0%
unpow1/275.0%
metadata-eval75.0%
pow-sqr75.0%
unpow1/275.0%
metadata-eval75.0%
pow-sqr75.0%
unswap-sqr75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-to-pow75.0%
exp-sum75.0%
distribute-rgt-in75.0%
*-commutative75.0%
exp-prod75.0%
+-commutative75.0%
exp-sum75.0%
rem-exp-log75.0%
rem-exp-log75.0%
*-commutative75.0%
exp-to-pow75.0%
exp-to-pow75.0%
Simplified75.0%
if 2.85000000000000011e197 < t Initial program 100.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 100.0%
Simplified100.0%
Taylor expanded in y around inf 85.7%
Final simplification76.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 1.9e-5)
(* t_1 (- (* x 0.5) y))
(if (<= t 1.28e+85)
(* y (* t_1 (+ -1.0 (* 0.5 (/ x y)))))
(* t_1 (* x (+ 0.5 (* (pow t 2.0) 0.25))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 1.9e-5) {
tmp = t_1 * ((x * 0.5) - y);
} else if (t <= 1.28e+85) {
tmp = y * (t_1 * (-1.0 + (0.5 * (x / y))));
} else {
tmp = t_1 * (x * (0.5 + (pow(t, 2.0) * 0.25)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 1.9d-5) then
tmp = t_1 * ((x * 0.5d0) - y)
else if (t <= 1.28d+85) then
tmp = y * (t_1 * ((-1.0d0) + (0.5d0 * (x / y))))
else
tmp = t_1 * (x * (0.5d0 + ((t ** 2.0d0) * 0.25d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 1.9e-5) {
tmp = t_1 * ((x * 0.5) - y);
} else if (t <= 1.28e+85) {
tmp = y * (t_1 * (-1.0 + (0.5 * (x / y))));
} else {
tmp = t_1 * (x * (0.5 + (Math.pow(t, 2.0) * 0.25)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 1.9e-5: tmp = t_1 * ((x * 0.5) - y) elif t <= 1.28e+85: tmp = y * (t_1 * (-1.0 + (0.5 * (x / y)))) else: tmp = t_1 * (x * (0.5 + (math.pow(t, 2.0) * 0.25))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 1.9e-5) tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y)); elseif (t <= 1.28e+85) tmp = Float64(y * Float64(t_1 * Float64(-1.0 + Float64(0.5 * Float64(x / y))))); else tmp = Float64(t_1 * Float64(x * Float64(0.5 + Float64((t ^ 2.0) * 0.25)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 1.9e-5) tmp = t_1 * ((x * 0.5) - y); elseif (t <= 1.28e+85) tmp = y * (t_1 * (-1.0 + (0.5 * (x / y)))); else tmp = t_1 * (x * (0.5 + ((t ^ 2.0) * 0.25))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.9e-5], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.28e+85], N[(y * N[(t$95$1 * N[(-1.0 + N[(0.5 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x * N[(0.5 + N[(N[Power[t, 2.0], $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 1.9 \cdot 10^{-5}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{elif}\;t \leq 1.28 \cdot 10^{+85}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 + {t}^{2} \cdot 0.25\right)\right)\\
\end{array}
\end{array}
if t < 1.9000000000000001e-5Initial program 99.7%
Taylor expanded in t around 0 76.1%
add-cube-cbrt75.5%
pow375.5%
Applied egg-rr75.5%
Taylor expanded in x around 0 74.1%
associate-*r*74.1%
rem-cube-cbrt74.8%
*-commutative74.8%
neg-mul-174.8%
associate-*r*74.8%
rem-cube-cbrt75.6%
*-commutative75.6%
distribute-rgt-in76.1%
*-commutative76.1%
+-commutative76.1%
sub-neg76.1%
Simplified76.1%
if 1.9000000000000001e-5 < t < 1.28000000000000004e85Initial program 100.0%
Taylor expanded in t around 0 27.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr27.0%
Taylor expanded in y around inf 53.1%
Simplified53.1%
if 1.28000000000000004e85 < t Initial program 100.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 85.4%
Simplified85.4%
Taylor expanded in x around inf 64.3%
*-commutative64.3%
Simplified64.3%
Final simplification71.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= (exp (/ (* t t) 2.0)) 1.12)
(* t_1 (- (* x 0.5) y))
(* y (* t_1 (+ -1.0 (* 0.5 (/ x y))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (exp(((t * t) / 2.0)) <= 1.12) {
tmp = t_1 * ((x * 0.5) - y);
} else {
tmp = y * (t_1 * (-1.0 + (0.5 * (x / y))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (exp(((t * t) / 2.0d0)) <= 1.12d0) then
tmp = t_1 * ((x * 0.5d0) - y)
else
tmp = y * (t_1 * ((-1.0d0) + (0.5d0 * (x / y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (Math.exp(((t * t) / 2.0)) <= 1.12) {
tmp = t_1 * ((x * 0.5) - y);
} else {
tmp = y * (t_1 * (-1.0 + (0.5 * (x / y))));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if math.exp(((t * t) / 2.0)) <= 1.12: tmp = t_1 * ((x * 0.5) - y) else: tmp = y * (t_1 * (-1.0 + (0.5 * (x / y)))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (exp(Float64(Float64(t * t) / 2.0)) <= 1.12) tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y)); else tmp = Float64(y * Float64(t_1 * Float64(-1.0 + Float64(0.5 * Float64(x / y))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (exp(((t * t) / 2.0)) <= 1.12) tmp = t_1 * ((x * 0.5) - y); else tmp = y * (t_1 * (-1.0 + (0.5 * (x / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision], 1.12], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(y * N[(t$95$1 * N[(-1.0 + N[(0.5 * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 1.12:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t\_1 \cdot \left(-1 + 0.5 \cdot \frac{x}{y}\right)\right)\\
\end{array}
\end{array}
if (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 1.1200000000000001Initial program 99.6%
Taylor expanded in t around 0 98.8%
add-cube-cbrt97.9%
pow397.9%
Applied egg-rr97.9%
Taylor expanded in x around 0 96.0%
associate-*r*96.0%
rem-cube-cbrt97.0%
*-commutative97.0%
neg-mul-197.0%
associate-*r*97.0%
rem-cube-cbrt98.0%
*-commutative98.0%
distribute-rgt-in98.8%
*-commutative98.8%
+-commutative98.8%
sub-neg98.8%
Simplified98.8%
if 1.1200000000000001 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) Initial program 100.0%
Taylor expanded in t around 0 17.9%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr17.9%
Taylor expanded in y around inf 34.8%
Simplified34.8%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= (* t t) 5e-17)
(* t_1 (- (* x 0.5) y))
(* (exp (/ (* t t) 2.0)) (* t_1 (- y))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if ((t * t) <= 5e-17) {
tmp = t_1 * ((x * 0.5) - y);
} else {
tmp = exp(((t * t) / 2.0)) * (t_1 * -y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if ((t * t) <= 5d-17) then
tmp = t_1 * ((x * 0.5d0) - y)
else
tmp = exp(((t * t) / 2.0d0)) * (t_1 * -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if ((t * t) <= 5e-17) {
tmp = t_1 * ((x * 0.5) - y);
} else {
tmp = Math.exp(((t * t) / 2.0)) * (t_1 * -y);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if (t * t) <= 5e-17: tmp = t_1 * ((x * 0.5) - y) else: tmp = math.exp(((t * t) / 2.0)) * (t_1 * -y) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (Float64(t * t) <= 5e-17) tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y)); else tmp = Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(t_1 * Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if ((t * t) <= 5e-17) tmp = t_1 * ((x * 0.5) - y); else tmp = exp(((t * t) / 2.0)) * (t_1 * -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t * t), $MachinePrecision], 5e-17], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \cdot t \leq 5 \cdot 10^{-17}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{else}:\\
\;\;\;\;e^{\frac{t \cdot t}{2}} \cdot \left(t\_1 \cdot \left(-y\right)\right)\\
\end{array}
\end{array}
if (*.f64 t t) < 4.9999999999999999e-17Initial program 99.6%
Taylor expanded in t around 0 99.6%
add-cube-cbrt98.8%
pow398.8%
Applied egg-rr98.8%
Taylor expanded in x around 0 96.8%
associate-*r*96.8%
rem-cube-cbrt97.8%
*-commutative97.8%
neg-mul-197.8%
associate-*r*97.8%
rem-cube-cbrt98.8%
*-commutative98.8%
distribute-rgt-in99.6%
*-commutative99.6%
+-commutative99.6%
sub-neg99.6%
Simplified99.6%
if 4.9999999999999999e-17 < (*.f64 t t) Initial program 100.0%
add-sqr-sqrt100.0%
pow2100.0%
pow1/2100.0%
sqrt-pow1100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 73.1%
mul-1-neg73.1%
associate-*l*73.1%
*-commutative73.1%
distribute-lft-neg-in73.1%
unpow1/273.1%
metadata-eval73.1%
pow-sqr73.1%
unpow1/273.1%
metadata-eval73.1%
pow-sqr73.1%
unswap-sqr73.1%
Simplified73.1%
Final simplification86.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= y -8.2e-73)
(* t_1 (- y))
(if (<= y 5e+38) (* t_1 (* x 0.5)) (* y (/ (* z -2.0) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (y <= -8.2e-73) {
tmp = t_1 * -y;
} else if (y <= 5e+38) {
tmp = t_1 * (x * 0.5);
} else {
tmp = y * ((z * -2.0) / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (y <= (-8.2d-73)) then
tmp = t_1 * -y
else if (y <= 5d+38) then
tmp = t_1 * (x * 0.5d0)
else
tmp = y * ((z * (-2.0d0)) / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (y <= -8.2e-73) {
tmp = t_1 * -y;
} else if (y <= 5e+38) {
tmp = t_1 * (x * 0.5);
} else {
tmp = y * ((z * -2.0) / t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if y <= -8.2e-73: tmp = t_1 * -y elif y <= 5e+38: tmp = t_1 * (x * 0.5) else: tmp = y * ((z * -2.0) / t_1) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (y <= -8.2e-73) tmp = Float64(t_1 * Float64(-y)); elseif (y <= 5e+38) tmp = Float64(t_1 * Float64(x * 0.5)); else tmp = Float64(y * Float64(Float64(z * -2.0) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (y <= -8.2e-73) tmp = t_1 * -y; elseif (y <= 5e+38) tmp = t_1 * (x * 0.5); else tmp = y * ((z * -2.0) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -8.2e-73], N[(t$95$1 * (-y)), $MachinePrecision], If[LessEqual[y, 5e+38], N[(t$95$1 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z * -2.0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-73}:\\
\;\;\;\;t\_1 \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+38}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z \cdot -2}{t\_1}\\
\end{array}
\end{array}
if y < -8.20000000000000032e-73Initial program 99.8%
Taylor expanded in t around 0 64.8%
add-cube-cbrt64.3%
pow364.4%
Applied egg-rr64.4%
Taylor expanded in x around 0 55.1%
mul-1-neg55.1%
*-commutative55.1%
rem-cube-cbrt55.9%
*-commutative55.9%
distribute-lft-neg-out55.9%
*-commutative55.9%
*-commutative55.9%
Simplified55.9%
if -8.20000000000000032e-73 < y < 4.9999999999999997e38Initial program 99.8%
Taylor expanded in t around 0 56.1%
add-cube-cbrt55.7%
pow355.6%
Applied egg-rr55.6%
Taylor expanded in x around inf 45.8%
associate-*r*45.8%
rem-cube-cbrt46.5%
Simplified46.5%
if 4.9999999999999997e38 < y Initial program 99.9%
Taylor expanded in t around 0 64.1%
add-cube-cbrt63.6%
pow363.7%
Applied egg-rr63.7%
Taylor expanded in x around 0 52.2%
mul-1-neg52.2%
*-commutative52.2%
rem-cube-cbrt53.0%
*-commutative53.0%
distribute-lft-neg-out53.0%
*-commutative53.0%
*-commutative53.0%
Simplified53.0%
neg-sub053.0%
flip--53.0%
metadata-eval53.0%
add-sqr-sqrt53.0%
*-commutative53.0%
add-sqr-sqrt53.0%
sqr-neg53.0%
sqrt-unprod0.0%
add-sqr-sqrt2.7%
sub-neg2.7%
neg-sub02.7%
add-sqr-sqrt0.0%
sqrt-unprod53.0%
sqr-neg53.0%
add-sqr-sqrt53.0%
*-commutative53.0%
Applied egg-rr53.0%
neg-sub053.0%
distribute-lft-neg-in53.0%
metadata-eval53.0%
*-commutative53.0%
Simplified53.0%
Final simplification50.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (or (<= y -2.8e-71) (not (<= y 5.8e+38)))
(* t_1 (- y))
(* t_1 (* x 0.5)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if ((y <= -2.8e-71) || !(y <= 5.8e+38)) {
tmp = t_1 * -y;
} else {
tmp = t_1 * (x * 0.5);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if ((y <= (-2.8d-71)) .or. (.not. (y <= 5.8d+38))) then
tmp = t_1 * -y
else
tmp = t_1 * (x * 0.5d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if ((y <= -2.8e-71) || !(y <= 5.8e+38)) {
tmp = t_1 * -y;
} else {
tmp = t_1 * (x * 0.5);
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if (y <= -2.8e-71) or not (y <= 5.8e+38): tmp = t_1 * -y else: tmp = t_1 * (x * 0.5) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if ((y <= -2.8e-71) || !(y <= 5.8e+38)) tmp = Float64(t_1 * Float64(-y)); else tmp = Float64(t_1 * Float64(x * 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if ((y <= -2.8e-71) || ~((y <= 5.8e+38))) tmp = t_1 * -y; else tmp = t_1 * (x * 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[y, -2.8e-71], N[Not[LessEqual[y, 5.8e+38]], $MachinePrecision]], N[(t$95$1 * (-y)), $MachinePrecision], N[(t$95$1 * N[(x * 0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-71} \lor \neg \left(y \leq 5.8 \cdot 10^{+38}\right):\\
\;\;\;\;t\_1 \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5\right)\\
\end{array}
\end{array}
if y < -2.8e-71 or 5.80000000000000013e38 < y Initial program 99.8%
Taylor expanded in t around 0 64.4%
add-cube-cbrt64.0%
pow364.0%
Applied egg-rr64.0%
Taylor expanded in x around 0 53.6%
mul-1-neg53.6%
*-commutative53.6%
rem-cube-cbrt54.4%
*-commutative54.4%
distribute-lft-neg-out54.4%
*-commutative54.4%
*-commutative54.4%
Simplified54.4%
if -2.8e-71 < y < 5.80000000000000013e38Initial program 99.8%
Taylor expanded in t around 0 56.1%
add-cube-cbrt55.7%
pow355.6%
Applied egg-rr55.6%
Taylor expanded in x around inf 45.8%
associate-*r*45.8%
rem-cube-cbrt46.5%
Simplified46.5%
Final simplification50.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (sqrt (* z 2.0)))) (if (<= t 0.36) (* t_1 (- (* x 0.5) y)) (* x (* t_1 (- 0.5 (/ y x)))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 0.36) {
tmp = t_1 * ((x * 0.5) - y);
} else {
tmp = x * (t_1 * (0.5 - (y / x)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 0.36d0) then
tmp = t_1 * ((x * 0.5d0) - y)
else
tmp = x * (t_1 * (0.5d0 - (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 0.36) {
tmp = t_1 * ((x * 0.5) - y);
} else {
tmp = x * (t_1 * (0.5 - (y / x)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 0.36: tmp = t_1 * ((x * 0.5) - y) else: tmp = x * (t_1 * (0.5 - (y / x))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 0.36) tmp = Float64(t_1 * Float64(Float64(x * 0.5) - y)); else tmp = Float64(x * Float64(t_1 * Float64(0.5 - Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 0.36) tmp = t_1 * ((x * 0.5) - y); else tmp = x * (t_1 * (0.5 - (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 0.36], N[(t$95$1 * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$1 * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 0.36:\\
\;\;\;\;t\_1 \cdot \left(x \cdot 0.5 - y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t\_1 \cdot \left(0.5 - \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if t < 0.35999999999999999Initial program 99.7%
Taylor expanded in t around 0 75.9%
add-cube-cbrt75.3%
pow375.3%
Applied egg-rr75.3%
Taylor expanded in x around 0 73.9%
associate-*r*73.9%
rem-cube-cbrt74.6%
*-commutative74.6%
neg-mul-174.6%
associate-*r*74.6%
rem-cube-cbrt75.3%
*-commutative75.3%
distribute-rgt-in75.9%
*-commutative75.9%
+-commutative75.9%
sub-neg75.9%
Simplified75.9%
if 0.35999999999999999 < t Initial program 100.0%
Taylor expanded in t around 0 20.0%
add-cube-cbrt20.0%
pow320.0%
Applied egg-rr20.0%
Taylor expanded in x around inf 31.6%
associate-*r*31.6%
rem-cube-cbrt31.6%
*-commutative31.6%
rem-cube-cbrt31.6%
*-commutative31.6%
distribute-rgt-out31.6%
*-commutative31.6%
+-commutative31.6%
mul-1-neg31.6%
unsub-neg31.6%
Simplified31.6%
Final simplification63.2%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- (* x 0.5) y)))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * ((x * 0.5) - y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((z * 2.0d0)) * ((x * 0.5d0) - y)
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * ((x * 0.5) - y);
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * ((x * 0.5) - y)
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(Float64(x * 0.5) - y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * ((x * 0.5) - y); end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(x \cdot 0.5 - y\right)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 59.9%
add-cube-cbrt59.5%
pow359.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 58.5%
associate-*r*58.5%
rem-cube-cbrt59.0%
*-commutative59.0%
neg-mul-159.0%
associate-*r*59.0%
rem-cube-cbrt59.5%
*-commutative59.5%
distribute-rgt-in59.9%
*-commutative59.9%
+-commutative59.9%
sub-neg59.9%
Simplified59.9%
Final simplification59.9%
(FPCore (x y z t) :precision binary64 (* (sqrt (* z 2.0)) (- y)))
double code(double x, double y, double z, double t) {
return sqrt((z * 2.0)) * -y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = sqrt((z * 2.0d0)) * -y
end function
public static double code(double x, double y, double z, double t) {
return Math.sqrt((z * 2.0)) * -y;
}
def code(x, y, z, t): return math.sqrt((z * 2.0)) * -y
function code(x, y, z, t) return Float64(sqrt(Float64(z * 2.0)) * Float64(-y)) end
function tmp = code(x, y, z, t) tmp = sqrt((z * 2.0)) * -y; end
code[x_, y_, z_, t_] := N[(N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{z \cdot 2} \cdot \left(-y\right)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 59.9%
add-cube-cbrt59.5%
pow359.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 31.4%
mul-1-neg31.4%
*-commutative31.4%
rem-cube-cbrt31.8%
*-commutative31.8%
distribute-lft-neg-out31.8%
*-commutative31.8%
*-commutative31.8%
Simplified31.8%
Final simplification31.8%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return y * sqrt((z * 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = y * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return y * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(y * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 59.9%
add-cube-cbrt59.5%
pow359.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 31.4%
mul-1-neg31.4%
*-commutative31.4%
rem-cube-cbrt31.8%
*-commutative31.8%
distribute-lft-neg-out31.8%
*-commutative31.8%
*-commutative31.8%
Simplified31.8%
pow1/231.8%
*-commutative31.8%
metadata-eval31.8%
pow-pow30.3%
distribute-rgt-neg-in30.3%
neg-sub030.3%
pow-pow31.8%
*-commutative31.8%
metadata-eval31.8%
pow1/231.8%
cancel-sign-sub-inv31.8%
distribute-lft-neg-in31.8%
pow131.8%
metadata-eval31.8%
sqrt-pow115.9%
*-commutative15.9%
sqrt-prod17.0%
*-commutative17.0%
add-sqr-sqrt1.3%
sqrt-unprod12.9%
Applied egg-rr2.6%
+-lft-identity2.6%
Simplified2.6%
Final simplification2.6%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 2.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024137
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))