2015-08-12 12:28 GMT+02:00 Andrew Bernard :
> Hi Harm,
>
>
>
> User specification of input only guessed at by me. :-)
>
> Of course, for negative and positive input (e.g. -3/2):
>
> (define (mixed-num x)
> (let* ((n (numerator x))
> (d (denominator x)))
> (cons (trun
Hi Harm,
User specification of input only guessed at by me. :-)
Of course, for negative and positive input (e.g. -3/2):
(define (mixed-num x)
(let* ((n (numerator x))
(d (denominator x)))
(cons (truncate (/ n d)) (abs (/ (remainder n d) d)
But are you sayin
2015-08-11 10:57 GMT+02:00 Thomas Morley :
> 2015-08-11 8:19 GMT+02:00 David Kastrup :
> [...]
>>
>> Well, how about something like
>>
>> (define (integer-and-fraction nmbr)
>> (let* ((wh (truncate nmbr)) (rem (- nmbr wh)))
>> (if (or (zero? wh) (zero? rem)) (format #f "~s" nmbr)
>> (fo
2015-08-11 8:19 GMT+02:00 David Kastrup :
[...]
>
> Well, how about something like
>
> (define (integer-and-fraction nmbr)
> (let* ((wh (truncate nmbr)) (rem (- nmbr wh)))
> (if (or (zero? wh) (zero? rem)) (format #f "~s" nmbr)
> (format #f "~s ~s" wh (abs rem)
>
> (display (integer
Thomas Morley writes:
> 2015-08-10 19:02 GMT+02:00 Thomas Morley :
>> Hi all,
>>
>> I want to put out 3/2 not as 1.5 but "1½" or "1 1/2"
>> Is there a predefined procedure in guile or do I need to define my own?
>>
>> Thanks,
>> Harm
>
> It's a matter of "exactness".
> And when #e comes into th
2015-08-10 19:02 GMT+02:00 Thomas Morley :
> Hi all,
>
> I want to put out 3/2 not as 1.5 but "1½" or "1 1/2"
> Is there a predefined procedure in guile or do I need to define my own?
>
> Thanks,
> Harm
It's a matter of "exactness".
And when #e comes into the game the guile-manual is not verbose
Hi all,
I want to put out 3/2 not as 1.5 but "1½" or "1 1/2"
Is there a predefined procedure in guile or do I need to define my own?
Thanks,
Harm
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-use