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

BigFloat compatibility #105

Merged
merged 8 commits into from
Feb 18, 2021
Merged

BigFloat compatibility #105

merged 8 commits into from
Feb 18, 2021

Conversation

fgerick
Copy link
Contributor

@fgerick fgerick commented Feb 17, 2021

This makes the use of "arbitrary" number types available for Julia >=v1.5 (due to mul! interface). This is also why the build fails on v1.0, not sure if this is something that needs to be supported.

I've updated also StaticArrays and included SizedArrays for non-isbitstypes in lu. I added the tests for many cases, but there are a few missing, as randn(BigFloat,n,n) does not yet exist in Julia.

closes #94

@haampie
Copy link
Member

haampie commented Feb 18, 2021

Thanks! This is great! mul! should be available since julia 1.3, were you hitting problems on 1.3/1.4? I'll test it when I have time

@fgerick
Copy link
Contributor Author

fgerick commented Feb 18, 2021

Ah my bad mul! was already in 1.3, time flies... I quickly checked with 1.3.1 and most tests work, just that there seems to be a tiny (4e-78) difference in the BigFloat precision:

Zero eigenvalues & low-rank matrices: Test Failed at /Users/felixger/.julia/dev/ArnoldiMethod/test/partial_schur.jl:24
  Expression: norm(B * schur.Q - schur.Q * schur.R) < 100 * eps(real(T))
   Evaluated: 1.731313276802366659169719086885007092791536617145785506261475248523890470176717e-75 < 1.727233711018888925077270372560079914223200072887256277004740694033718360632485e-75
Stacktrace:
 [1] top-level scope at /Users/felixger/.julia/dev/ArnoldiMethod/test/partial_schur.jl:24
 [2] top-level scope at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
 [3] top-level scope at /Users/felixger/.julia/dev/ArnoldiMethod/test/partial_schur.jl:13
Test Summary:                        | Pass  Fail  Total
Zero eigenvalues & low-rank matrices |   19     1     20
ERROR: LoadError: LoadError: Some tests did not pass: 19 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /Users/felixger/.julia/dev/ArnoldiMethod/test/partial_schur.jl:6
in expression starting at /Users/felixger/.julia/dev/ArnoldiMethod/test/runtests.jl:16
ERROR: Package ArnoldiMethod errored during testing

@haampie
Copy link
Member

haampie commented Feb 18, 2021

Let's see if those spurious errors persist or not, right now CI is fine.

@haampie haampie closed this Feb 18, 2021
@haampie haampie reopened this Feb 18, 2021
@haampie
Copy link
Member

haampie commented Feb 18, 2021

how do i get rid of travis...

@haampie haampie closed this Feb 18, 2021
@haampie haampie reopened this Feb 18, 2021
@haampie haampie merged commit 8004259 into JuliaLinearAlgebra:master Feb 18, 2021
@haampie
Copy link
Member

haampie commented Feb 19, 2021

Thanks for the contribution! A new version is pending.

I can highly recommend MultiFloats.jl over BigFloat by the way since it works in-place

@fgerick
Copy link
Contributor Author

fgerick commented Feb 19, 2021

Cool! I didn't know about that package, thanks :) I've been using DoubleFloats.jl mostly. I'll check out if the advertised 2x performance improvement holds!

@haampie
Copy link
Member

haampie commented Feb 22, 2021

I think the 2x speedup is mostly due to avoiding the machinery for NaNs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BigFloat matrix in partialschur() does not work
2 participants