I want to know how the build-in function sin() is implemented in FORTRAN, because I try to write functions that can receive both scalars and array as its input variable, the effect of which can be found in sin(), that sin(0) returns 0 and sin(a), where array a=(/0,3.14...), returns an array (0,0).
I hope all mathematical functions I am gonna write can have this kind of flexibility and advantage. Someone could do me a favor?
You can make an elemental function
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With