Average Error: 0.1 → 0.1
Time: 7.5s
Precision: binary64
\[x \cdot \sin y + z \cdot \cos y \]
\[x \cdot \sin y + z \cdot \cos y \]
(FPCore (x y z) :precision binary64 (+ (* x (sin y)) (* z (cos y))))
(FPCore (x y z) :precision binary64 (+ (* x (sin y)) (* z (cos y))))
double code(double x, double y, double z) {
	return (x * sin(y)) + (z * cos(y));
}
double code(double x, double y, double z) {
	return (x * sin(y)) + (z * cos(y));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * sin(y)) + (z * cos(y))
end function
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * sin(y)) + (z * cos(y))
end function
public static double code(double x, double y, double z) {
	return (x * Math.sin(y)) + (z * Math.cos(y));
}
public static double code(double x, double y, double z) {
	return (x * Math.sin(y)) + (z * Math.cos(y));
}
def code(x, y, z):
	return (x * math.sin(y)) + (z * math.cos(y))
def code(x, y, z):
	return (x * math.sin(y)) + (z * math.cos(y))
function code(x, y, z)
	return Float64(Float64(x * sin(y)) + Float64(z * cos(y)))
end
function code(x, y, z)
	return Float64(Float64(x * sin(y)) + Float64(z * cos(y)))
end
function tmp = code(x, y, z)
	tmp = (x * sin(y)) + (z * cos(y));
end
function tmp = code(x, y, z)
	tmp = (x * sin(y)) + (z * cos(y));
end
code[x_, y_, z_] := N[(N[(x * N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(N[(x * N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \sin y + z \cdot \cos y
x \cdot \sin y + z \cdot \cos y

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \sin y + z \cdot \cos y \]
  2. Applied add-cube-cbrt_binary640.6

    \[\leadsto \color{blue}{\left(\sqrt[3]{x \cdot \sin y} \cdot \sqrt[3]{x \cdot \sin y}\right) \cdot \sqrt[3]{x \cdot \sin y}} + z \cdot \cos y \]
  3. Applied pow1/3_binary6429.5

    \[\leadsto \left(\sqrt[3]{x \cdot \sin y} \cdot \sqrt[3]{x \cdot \sin y}\right) \cdot \color{blue}{{\left(x \cdot \sin y\right)}^{0.3333333333333333}} + z \cdot \cos y \]
  4. Applied pow1/3_binary6429.7

    \[\leadsto \left(\sqrt[3]{x \cdot \sin y} \cdot \color{blue}{{\left(x \cdot \sin y\right)}^{0.3333333333333333}}\right) \cdot {\left(x \cdot \sin y\right)}^{0.3333333333333333} + z \cdot \cos y \]
  5. Applied pow1/3_binary6429.8

    \[\leadsto \left(\color{blue}{{\left(x \cdot \sin y\right)}^{0.3333333333333333}} \cdot {\left(x \cdot \sin y\right)}^{0.3333333333333333}\right) \cdot {\left(x \cdot \sin y\right)}^{0.3333333333333333} + z \cdot \cos y \]
  6. Applied pow-prod-up_binary6429.8

    \[\leadsto \color{blue}{{\left(x \cdot \sin y\right)}^{\left(0.3333333333333333 + 0.3333333333333333\right)}} \cdot {\left(x \cdot \sin y\right)}^{0.3333333333333333} + z \cdot \cos y \]
  7. Applied pow-prod-up_binary640.1

    \[\leadsto \color{blue}{{\left(x \cdot \sin y\right)}^{\left(\left(0.3333333333333333 + 0.3333333333333333\right) + 0.3333333333333333\right)}} + z \cdot \cos y \]
  8. Final simplification0.1

    \[\leadsto x \cdot \sin y + z \cdot \cos y \]

Reproduce

herbie shell --seed 2022129 
(FPCore (x y z)
  :name "Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, B"
  :precision binary64
  (+ (* x (sin y)) (* z (cos y))))