lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: * Use scm_to_int64/from_int64 for Rational/SCM conversions.


From: Neil Puttock
Subject: Re: * Use scm_to_int64/from_int64 for Rational/SCM conversions.
Date: Wed, 24 Sep 2008 23:42:04 +0100

2008/9/21  <address@hidden>:

> http://codereview.appspot.com/5889/diff/1/6
> File lily/moment.cc (right):
>
> http://codereview.appspot.com/5889/diff/1/6#newcode134
> Line 134: {
> If you want to be paranoid, you could check that the most significant
> bit is 1 here.

That would imply a negative number, wouldn't it?

Since we can only be sure that I64 is at least 64 bits, how about this?

if (((main_part_.den () >> (sizeof (I64) * 8 - 1) & 1)))
   error ("...");

Regards,
Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]