This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
H. Peter Anvin wrote:
In other words, B300 == 7, so 7 baud would be represented by the value 300.
I'm afraid I'm confused by this use of "baud_t" and "7 baud". A baud is one symbol per second, which in general differs from one bit per second. Still, if 7 baud corresponds to 300 bits per second, I'm having trouble seeing what's going on. I guess you mean that a speed_t value equal to B300 corresponds to a baud_t value equal to 300, but I could well be wrong.
I suggest giving the new type a name other than "baud_t" to avoid this sort of confusion. "bps_t" or "bits_per_second_t" would be better.
Now, assuming we really want to support baud rates over 4 Gbps, I'm thinking of an interface which might amount to a 5:27 floating point number. no sign bit, and biased for integers only.
Why not use 'float' or 'double' for this? No sense reinventing the floating-point wheel.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |