ok - thanks - seems like if one remembers to use "BigDecimal('10.1')", then
instead of 10.1 in your code you should be ok then.
On Mon, Jan 12, 2009 at 6:45 AM, Maurício Linhares <
mauricio.linha...@gmail.com> wrote:
> This is a very bad idea, as you can break the whole runtime by doing
> this, a
On Sun, Jan 11, 2009 at 12:17 AM, Greg Hauptmann <
greg.hauptmann.r...@gmail.com> wrote:
> Any suggestions on how to write an rspec expectation for equality when you
> get a BigDecimal back. I see that "big_decimal_variable.should == 123.23"
> doesn't work as the ruby BigDecimal comparison (via
2009-01-11 18:17, Greg Hauptmann:
> Any suggestions on how to write an rspec expectation for equality when you
> get a BigDecimal back. I see that "big_decimal_variable.should ==
> 123.23"
If you register keywords "comparison" and "float", you should train
yourself to cry out "delta" without even
This is a very bad idea, as you can break the whole runtime by doing
this, as many internal classes use floating point math. You would also
slow the world down, as operations using BigDecimals are some order of
magnitude slower than pure floating point math.
-
Maurício Linhares
http://alinhavado.w
it would be nice in one's project if you could basically say "use
BigDecimal wherever you normally would have used a float", just to get the
benefit but maintain ease of coding/readability etc - anyone know if this is
possible? Would it be enough to override Float's initializer and return a
BigDe
On Sun, Jan 11, 2009 at 9:21 AM, David Chelimsky wrote:
> On Sun, Jan 11, 2009 at 4:05 AM, Greg Hauptmann
> wrote:
> > I've gone with the following
> > ai.amount.should == BigDecimal('-323.03')
> > However I'm still a bit surprised that Ruby itself does allow a good "=="
> > test between a F
On Sun, Jan 11, 2009 at 4:05 AM, Greg Hauptmann
wrote:
> I've gone with the following
> ai.amount.should == BigDecimal('-323.03')
> However I'm still a bit surprised that Ruby itself does allow a good "=="
> test between a Float and a BigDecimal. Perhaps there's a reason that I'm
> missing?
On Sun, Jan 11, 2009 at 1:56 PM, Tom Cloyd wrote:
> I hope I'm not the only one in the world who posts to a discussion list
> only to (maybe) get the answer to a question moments after hitting
> posting. Sigh.
>
> Looking again, in the cucumber wiki page "Running Features", I had a
> sense that I
On 11 Jan 2009, at 01:22, MarkMT wrote:
Thanks Matt. I have now found the page that deals with scenario
outlines (GH is back up) -
http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines
so that is now pretty clear. Might be worth a note in the fit table
page referring to that.
The
On Sun, Jan 11, 2009 at 1:26 PM, Tom Cloyd wrote:
> A hope my ignorance is acceptable here. I have, to this point,
> programmed in Ruby mostly using my awareness of procedural programming;
> I've written a small number of very useful programs for myself. I'm starting
> to use classes now - just s
> I hope I'm not the only one in the world who posts to a discussion list
> only to (maybe) get the answer to a question moments after hitting
> posting. Sigh.
Hey, that's my trick! Get your own!
2009/1/11 Tom Cloyd
> I hope I'm not the only one in the world who posts to a discussion list
> only
I hope I'm not the only one in the world who posts to a discussion list
only to (maybe) get the answer to a question moments after hitting
posting. Sigh.
Looking again, in the cucumber wiki page "Running Features", I had a
sense that I maybe I DID know what to do, went to
/examples/dos_line_endin
A hope my ignorance is acceptable here. I have, to this point,
programmed in Ruby mostly using my awareness of procedural programming;
I've written a small number of very useful programs for myself. I'm
starting to use classes now - just starting.
I have a small project I'm working on - settin
I've gone with the following ai.amount.should == BigDecimal('-323.03')
However I'm still a bit surprised that Ruby itself does allow a good "=="
test between a Float and a BigDecimal. Perhaps there's a reason that I'm
missing?
On Sun, Jan 11, 2009 at 7:23 PM, Mark Wilden wrote:
> On Sun,
On Sun, Jan 11, 2009 at 12:17 AM, Greg Hauptmann <
greg.hauptmann.r...@gmail.com> wrote:
>
> Any suggestions on how to write an rspec expectation for equality when you
> get a BigDecimal back. I see that "big_decimal_variable.should == 123.23"
> doesn't work as the ruby BigDecimal comparison (via
Hi,
Any suggestions on how to write an rspec expectation for equality when you
get a BigDecimal back. I see that "big_decimal_variable.should == 123.23"
doesn't work as the ruby BigDecimal comparison (via ==) to the same Float
value gives false (not true as you'd expect). For background / as an
e
16 matches
Mail list logo