Average Error: 0.9 → 0.8
Time: 4.4s
Precision: binary64
\[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
\[\tan^{-1}_* \frac{im}{re} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}\]
\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}
\tan^{-1}_* \frac{im}{re} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}
(FPCore (re im) :precision binary64 (/ (atan2 im re) (log 10.0)))
(FPCore (re im)
 :precision binary64
 (* (atan2 im re) (/ (sqrt (/ 1.0 (log 10.0))) (sqrt (log 10.0)))))
double code(double re, double im) {
	return atan2(im, re) / log(10.0);
}
double code(double re, double im) {
	return atan2(im, re) * (sqrt(1.0 / log(10.0)) / sqrt(log(10.0)));
}

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.9

    \[\frac{\tan^{-1}_* \frac{im}{re}}{\log 10}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt_binary64_1000.9

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re}}{\color{blue}{\sqrt{\log 10} \cdot \sqrt{\log 10}}}\]
  4. Applied *-un-lft-identity_binary64_780.9

    \[\leadsto \frac{\color{blue}{1 \cdot \tan^{-1}_* \frac{im}{re}}}{\sqrt{\log 10} \cdot \sqrt{\log 10}}\]
  5. Applied times-frac_binary64_840.8

    \[\leadsto \color{blue}{\frac{1}{\sqrt{\log 10}} \cdot \frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{\log 10}}}\]
  6. Taylor expanded around 0 0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\sqrt{\frac{1}{\log 10}} \cdot \tan^{-1}_* \frac{im}{re}\right)}\]
  7. Simplified0.8

    \[\leadsto \frac{1}{\sqrt{\log 10}} \cdot \color{blue}{\left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)}\]
  8. Using strategy rm
  9. Applied associate-*l/_binary64_210.8

    \[\leadsto \color{blue}{\frac{1 \cdot \left(\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}\right)}{\sqrt{\log 10}}}\]
  10. Simplified0.8

    \[\leadsto \frac{\color{blue}{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}}{\sqrt{\log 10}}\]
  11. Using strategy rm
  12. Applied pow1_binary64_1390.8

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}{\sqrt{\log \color{blue}{\left({10}^{1}\right)}}}\]
  13. Applied log-pow_binary64_1670.8

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}{\sqrt{\color{blue}{1 \cdot \log 10}}}\]
  14. Applied sqrt-prod_binary64_940.8

    \[\leadsto \frac{\tan^{-1}_* \frac{im}{re} \cdot \sqrt{\frac{1}{\log 10}}}{\color{blue}{\sqrt{1} \cdot \sqrt{\log 10}}}\]
  15. Applied times-frac_binary64_840.8

    \[\leadsto \color{blue}{\frac{\tan^{-1}_* \frac{im}{re}}{\sqrt{1}} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}}\]
  16. Final simplification0.8

    \[\leadsto \tan^{-1}_* \frac{im}{re} \cdot \frac{\sqrt{\frac{1}{\log 10}}}{\sqrt{\log 10}}\]

Reproduce

herbie shell --seed 2021024 
(FPCore (re im)
  :name "math.log10 on complex, imaginary part"
  :precision binary64
  (/ (atan2 im re) (log 10.0)))