The following code is scheme (GNU Guile) and the language detector fails to
detect it correctly:
<pre class="prettyprint"><code>(define (cont-frac-rec numer denom k)
(define (step i)
(if (> i k) 0
(/ (numer i) (+ (denom i) (step (1+ i))))))
(step 1))
(define (cont-frac-iter numer denom k)
(define (step tally i)
(if (< i 1) tally
(step (/ (numer i) (+ tally (denom i))) (1- i))))
(step 0.0 k))
(define (cont-frac numer denom k)
; (cont-frac-rec numer denom k)
(cont-frac-iter numer denom k)
)
(let ((phiInverse (cont-frac (lambda (i) 1.0) (lambda (i) 1.0) 20)))
(if (or (> phiInverse 0.6181) (< phiInverse 0.6180))
(display (string-append "FAIL: " (number->string phiInverse))) #t))
</code></pre>
Workaround is to specify the language in the class, which I am able to do due
to issue 224.
Original issue reported on code.google.com by Sam.Hall...@gmail.com on 20 Oct 2012 at 5:59
Original issue reported on code.google.com by
Sam.Hall...@gmail.com
on 20 Oct 2012 at 5:59