April 27, 2010 Re: MessagePack for D released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars T. Kyllingstad | On Wed, 28 Apr 2010 02:20:58 +0900, Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote:
> For systems where real is 64 bits it may be possible to use an 80-bit std.numeric.CustomFloat as an intermediate step between the stored data and the 64-bit type.
Thanks for your advice!
|
April 27, 2010 Re: MessagePack for D released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars T. Kyllingstad | On Wed, 28 Apr 2010 02:20:58 +0900, Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote:
> For systems where real is 64 bits it may be possible to use an 80-bit std.numeric.CustomFloat as an intermediate step between the stored data and the 64-bit type.
I tried std.numeric.CustomFloat:
-----
alias CustomFloat!(1, 64, 15) RealRep;
-----
But this code doesn't comile...
|
April 28, 2010 Re: MessagePack for D released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars T. Kyllingstad | On Tue, 27 Apr 2010 21:27:35 +0900, Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote: > It doesn't seem to support the real type. It this a limitation of the MessagePack format or just an oversight? Even if the format doesn't directly support 80-bit floats, it should be possible to wrap them somehow. Finished. http://bitbucket.org/repeatedly/msgpack4d/changeset/87954e46548e If real type equals double type: - Packer uses double type for real type. - Unpacker raises UnpackException when receives real type. The reason for this, To use real type means that precision is important. How does it look? |
April 28, 2010 Re: MessagePack for D released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Masahiro Nakagawa | On Tue, 27 Apr 2010 15:37:56 -0300, Masahiro Nakagawa <repeatedly@gmail.com> wrote: > On Wed, 28 Apr 2010 02:20:58 +0900, Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote: > >> For systems where real is 64 bits it may be possible to use an 80-bit std.numeric.CustomFloat as an intermediate step between the stored data and the 64-bit type. > I tried std.numeric.CustomFloat: > ----- > alias CustomFloat!(1, 64, 15) RealRep; > ----- > But this code doesn't comile... CustomFloat currently is currently broken. There are some partial patches (see http://d.puremagic.com/issues/show_bug.cgi?id=3520), but I don't they will address this issue. |
April 28, 2010 Re: MessagePack for D released | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Jacques | On Wed, 28 Apr 2010 10:02:52 +0900, Robert Jacques <sandford@jhu.edu> wrote:
> On Tue, 27 Apr 2010 15:37:56 -0300, Masahiro Nakagawa <repeatedly@gmail.com> wrote:
>
>> On Wed, 28 Apr 2010 02:20:58 +0900, Lars T. Kyllingstad <public@kyllingen.nospamnet> wrote:
>>
>>> For systems where real is 64 bits it may be possible to use an 80-bit std.numeric.CustomFloat as an intermediate step between the stored data and the 64-bit type.
>> I tried std.numeric.CustomFloat:
>> -----
>> alias CustomFloat!(1, 64, 15) RealRep;
>> -----
>> But this code doesn't comile...
>
> CustomFloat currently is currently broken. There are some partial patches (see http://d.puremagic.com/issues/show_bug.cgi?id=3520), but I don't they will address this issue.
Yeah. CustomFloat uses std.bitmanip.bitfields for internal state, but
bitfields can't deal with large size :(
|
Copyright © 1999-2021 by the D Language Foundation