January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | Maybe I need good examples on C++, for this class, because a lot of examples on C++. |
January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | I am looking for not only free solutions. |
January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | On 31.01.15 15:45, RuZzz wrote: > Maybe I need good examples on C++, for this class, because a lot of > examples on C++. Maybe this can help you: https://github.com/andersonpd/decimal |
January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | On Saturday, 31 January 2015 at 14:26:45 UTC, RuZzz wrote:
> The next version, which does not work:
> https://bpaste.net/show/b9c85de68d07
I really dont understand what your trying to achieve here.
Maybe you can articulate it in one post what this class is trying to achieve?
|
January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Colin | On Saturday, 31 January 2015 at 15:02:09 UTC, Colin wrote: > Maybe you can articulate it in one post what this class is trying to achieve? Maybe this? https://github.com/andersonpd/decimal/blob/master/decimal/bigfloat.d The main thing is not to lose currency in calculations that use arithmetic. |
January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to zeljkog | On 31.01.15 15:56, zeljkog wrote: > On 31.01.15 15:45, RuZzz wrote: >> Maybe I need good examples on C++, for this class, because a lot of >> examples on C++. > > Maybe this can help you: > https://github.com/andersonpd/decimal Also http://code.dlang.org/packages/eris |
January 31, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | The next version https://bpaste.net/show/9468f24d9df0 |
February 11, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | With "eris" lib some problems, the first error: .../.dub/packages/eris-0.0.1/eris/integer/digits.d(241): Error: cannot implicitly convert expression (digits.length) of type ulong to int What can I import to use rational numbers? I found it https://github.com/dsimcha/Rational/blob/master/rational.d https://github.com/d-gamedev-team/gfm/blob/master/math/gfm/math/rational.d but I do not understand what the story ended with rational numbers in D. |
February 11, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | https://github.com/acmeism/RosettaCodeData/blob/master/Task/Arithmetic-Rational/D/arithmetic-rational.d |
February 14, 2015 Re: How to make a Currency class from std.BigInt? | ||||
---|---|---|---|---|
| ||||
Posted in reply to RuZzz | The next version https://bpaste.net/show/dc3c5f10f2ca I use https://github.com/dsimcha/Rational/blob/master/rational.d I want to do it: auto c = new Currencies!Rational.rational.Rational!(BigInt); where Rational.rational.Rational it is std.rational.Rational I get the error: Error: template instance Currencies!(Rational) does not match template declaration Currencies(T) |
Copyright © 1999-2021 by the D Language Foundation