/usr/share/doc/mathomatic/tests/radius.in is in mathomatic 15.8.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ; 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
#s ; Search backwards for the s variable; "/" searches forwards.
clear ; No longer needed.
display all
|