Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 86c3d80c4d6e905f610c100030811165 > files > 54

mathomatic-14.5.5-1mdv2010.0.i586.rpm

; Some more fun formulas.  These are very similar to Heron's formula
; for the area of a triangle (see "heron.in").  a, b, and c are the
; lengths of the sides of the triangle.

s=(a+b+c)/2 ; semiperimeter
; radius of a circle inscribed in a triangle, called an incircle:
inradius=(s*(s-a)*(s-b)*(s-c))^.5/s
eliminate s
simplify
; The following is the equation for the radius of a circle circumscribing
; a triangle, called a circumcircle, which is a circle that passes through
; all the vertices of a polygon.
radius=a*b*c/(4*(s*(s-a)*(s-b)*(s-c))^.5)
eliminate s
simplify