Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement better complex division algorithm #5072

Closed
JeffBezanson opened this issue Dec 9, 2013 · 3 comments · Fixed by #5112
Closed

implement better complex division algorithm #5072

JeffBezanson opened this issue Dec 9, 2013 · 3 comments · Fixed by #5112
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@JeffBezanson
Copy link
Sponsor Member

I discovered this through the LAPACK 3.5.0 release notes:

http://www.netlib.org/lapack/explore-html/df/d90/dladiv_8f_source.html

We are using a standard algorithm, but the one above is better.

@ggggggggg
Copy link
Contributor

I can give this a shot. How do I do the equivalent of

  136       ov = dlamch( 'Overflow threshold' ) # realmax(Type)
  137       un = dlamch( 'Safe minimum' ) # realmin(Type)
  138       eps = dlamch( 'Epsilon' ) # this one is eps(Type)

edit: added my guesses

@ggggggggg
Copy link
Contributor

The archive paper provides 10 example hard complex divisions with answers. It also provides an algorithm for measuring the accuracy of the result in "bits", which I have implemented. The robust cdiv algorithm is said to get 53 bits for all but num8 on the hard problems, where it gets 52 bits. I reproduce all of the results (also the default julia / reproduces results for smith's algorithm), except I get 0 bits on num5. I've tracked this down to the division of b/c returning zero inside robust_cdiv2, after r is also zero. But it's not clear how to fix it.

Link to gist with code and output: https://gist.github.com/ggggggggg/7904745

@ggggggggg
Copy link
Contributor

I just had transcribed the answer to num5 incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants