how to find sinh value in degree in javascript -


for sinh(30) did

var rad=(math.exp(30) - math.exp(-30)) / 2; 

above 1 giving value in radian correctly. degree if do

 var deg=rad * (180/math.pi);// giving 306144945697592.7   

but in scientific calculator sinh(30)

sinh(30)=0.547853473888 

what logic find sinh value in javascript

30 should in radians, not degrees in first one.

function deg2rad (radangle) {   return radangle * .017453292519943295; } function sinh (arg) {   return (math.exp(arg) - math.exp(-arg)) / 2; } var x = deg2rad(30); var ans = sinh(x); alert(ans); 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -