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

Add array support in tan, cosh, sinh, tanh #2858

Merged

Conversation

HarshitaKalani
Copy link
Contributor

Fixes: #2242

@HarshitaKalani
Copy link
Contributor Author

Although, asin(x) should take x which should be as follows:
X The type shall be either REAL and a magnitude that is less than or equal to one - or be COMPLEX.
Still, for the following example, GFortran gives the output for the first element of the array whereas LFortran doesn't do that.

program intrinsics_82
    double precision :: x(5)
    x(1) = 1.0d0
    x(2) = 2.0d0
    x(3) = 3.0d0
    x(4) = 4.0d0
    x(5) = 5.0d0
    print *, asin(x)
end
$ gfortran a.f90 && ./a.out
   1.5707963267948966                            NaN                       NaN                       NaN                       NaN
$ lfortran a.f90
0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 0.00000000000000000e+00 

@HarshitaKalani HarshitaKalani marked this pull request as ready for review November 16, 2023 14:52
Copy link
Member

@Thirumalai-Shaktivel Thirumalai-Shaktivel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well, thank you!

@Thirumalai-Shaktivel Thirumalai-Shaktivel merged commit 5fb450b into lfortran:main Nov 17, 2023
20 checks passed
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.

Add array support in cosh and similiar Instrinsic
3 participants