Program to find the Eccentricity of a Hyperbola | Function to find the eccentricity of a hyperbola ; Stores the squared ratio of major axis to minor axis ; Increment r by 1 ; Return the square root of r ; Driver Code
function eccHyperbola ( A , B ) { let r = B * B / A * A ; r += 1 ; return Math . sqrt ( r ) ; } let A = 3.0 ; let B = 2.0 ; document . write ( eccHyperbola ( A , B ) ) ;