Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 4.1.1 doesn't compile



On Jun 25, 11:48am, Oliver Kiddle wrote:
} Subject: Re: 4.1.1 doesn't compile
}
}      #define DIGBUFSIZE ((int)(((sizeof(zlong) * 8) - 1) * 0.30103) + 3)
} 
} But I don't understand what the calculation is doing. Anyone
} else have any idea?

It's computing the number of decimal digits necessary to represent the
largest number that can also be represented by the binary digits in a
variable of type zlong.  The -1 and +3 adjust for floating point rounding
errors, a leading "-" for negative numbers, and the trailing NUL byte.



Messages sorted by: Reverse Date, Date, Thread, Author