On 2014-12-09 3:21, Ken Barber wrote:
Instead of continuing on the old thread "A question about numbers and
representation", I decided to open a new thread avout BigDecimal to see if
we can come to closure on that separately.

Digging a bit more into Ruby, and how it handles floating point reveals that
there is in fact no automatic fluent transition to BigDecimal. All floating
point calculations are performed with the native double representation on
the platform ruby is executing on. Since Puppet does not create any
BigDecimal numbers no one has ever been able to create a value with higher
precision in Puppet than what the native double provides (unless doing so in
custom Ruby functions I should add).

So wow, this never worked? I can't say I'm surprised. I wonder if
there are any real world cases where people have done this in ruby
plugins.

ken.

BigDecimal is only mentioned once in the puppet code base in the vendored RGen gem (it supports BigDecimal attributes (unused by Puppet though)).

In Facter the CFPropertyList util checks if BigDecimal is defined and uses it to parse a number and return a CFReal (I did not dig further how CFReal is used). I guess this means that a CFReal could surface from Facter somhow, but not sure what it does internally.

- henrik
--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/luv83e%248e9%241%40ger.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to