다음은 이차방정식 x^2 - x - 1 = 0 의 양의 근 즉 황금비율(golden ratio)을 구하는 Groovy 애플리케이션 소스이다. 황금비율을 구하는 비례방정식은 1 : x = x : (x+1) 이며, 이를 이차방정식으로 표현한 것이 x^2 - x - 1 = 0 이다. See: http://en.wikipedia.org/wiki/Golden_ratio /* * Filename: testGoldenRatio.groovy * 황금률(즉, 이차방정식 x^2 - x - 1 = 0 의 양의 근)을 계산한다. * * Execute: groovy testGoldenRatio.groovy * * Date: 2008/03/24 * Author: PH Kim [ pkim (AT) scripts.pe.kr ] */..