# tvaspect.frink

``` /**  If a television has an aspect ratio of 16:9, and a diagonal size of      55 inches, how wide is it? */ use systemSolver2.frink symbolicMode[true] showApproximations[false] showDimensionName[false] // Create a system of simultaneous equations and let Frink rearrange // and solve it. tv = new System[[width / height === aspect ,                     diagonal^2 === height^2 + width^2],  // Pythagorean theorem (in natural form!)                 []] // Show all solutions to show off //println[join["\n",tv.solveAll[]]] tv.solveAll[] // Plug in exact numbers and solve for the wall's cross section. println["Solutions:"] values = [["aspect", 16/9],           ["diagonal", 55 in]] dsols = tv.solveForValues["width", values] //println["dsols is \$dsols"] println[positive[eval[dsols]]->"in"] ```

This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 18228 days, 7 hours, 25 minutes ago.