feat: add lapack/base/dlaev2#2828
Open
Pranavchiku wants to merge 6 commits into
Open
Conversation
kgryte
reviewed
Sep 17, 2024
|
|
||
| var ev = new Float64Array( 2 ); | ||
| var out = new Float64Array( 2 ); | ||
| out = dlaev2( 2.0, 3.0, 4.0, out, ev ); |
Member
There was a problem hiding this comment.
Do something different; otherwise, what is the point of having this code block?
kgryte
reviewed
Sep 17, 2024
| b.tic(); | ||
| for ( i = 0; i < b.iterations; i++ ) { | ||
| out = dlaev2( A, B, C, out, ev ); | ||
| A = out[ i%out.length ]; |
Member
There was a problem hiding this comment.
Why are we recycling out values?
kgryte
reviewed
Sep 17, 2024
| b.tic(); | ||
| for ( i = 0; i < b.iterations; i++ ) { | ||
| out = dlaev2( A, B, C, out, 1, 0, ev, 1, 0 ); | ||
| A = out[ i%out.length ]; |
kgryte
reviewed
Sep 17, 2024
| - **B**: the (0,1) and the conjugate of (1,0) element of a 2x2 symmetric matrix. | ||
| - **C**: the (1,1) element of a 2x2 symmetric matrix. | ||
| - **out**: output [`Float64Array`][mdn-float64array] containing the eigenvalues of larger and smaller absolute values respectively. | ||
| - **ev**: output [`Float64Array`][mdn-float64array] containing `CS1` and `SN1` which is unit right eigenvector for `RT1` giving the decomposition. |
Member
There was a problem hiding this comment.
You're going to need to explain CS1 and SN1 and RT1. This description doesn't tell me a whole lot. Either add prose or show equations.
kgryte
reviewed
Sep 17, 2024
| acmn = A; | ||
| } | ||
| if ( adf > ab ) { | ||
| rt = adf * sqrt( 1.0 + pow( ( ab / adf ), 2 ) ); |
kgryte
reviewed
Sep 17, 2024
| rt = ab * sqrt( 1.0 + pow( ( adf / ab ), 2 ) ); | ||
| } else { | ||
| // Includes case AB = ADF = 0 | ||
| rt = ab * sqrt( 2.0 ); |
kgryte
reviewed
Sep 17, 2024
| out = new Float64Array( 2 ); | ||
| ev = new Float64Array( 2 ); | ||
| out = dlaev2( 2.0, 3.0, 4.0, out, ev ); | ||
| expected = new Float64Array( [ 6.16227766016838, -0.1622776601683793 ] ); |
Member
There was a problem hiding this comment.
Where do the expected values come from?
kgryte
reviewed
Sep 17, 2024
| t.end(); | ||
| }); | ||
|
|
||
| tape( 'the function supports complex access pattern to store computed values', function test( t ) { |
Member
There was a problem hiding this comment.
Improve these tests as discussed on other PRs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #2464.
Description
This PR adds JS implementation for
lapack/base/dlaev2Related Issues
NA
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers