Project

General

Profile

This project is closed and read-only.

Actions

Backport #3159

closed

BigDecimal broken in 32bit Ruby

Backport #3159: BigDecimal broken in 32bit Ruby

Added by DerGuteMoritz (Moritz Heidkamp) over 16 years ago. Updated over 15 years ago.

Status:
Closed
Assignee:
-
[ruby-core:29556]

Description

=begin
The following code:

require 'bigdecimal'
BigDecimal.new('100000000').div(BigDecimal.new('3'))

returns (as one would expect) 33333333 in 64bit Ruby (tested on NetBSD and Linux). In 32bit Ruby, however, it returns 33330000 (as one would probably not expect). This is true for 1.8.x as well as 1.9.x (tested on Linux and Mac OS X Slow Lepperd). Unfortunately, I can't provide a patch to fix this but maybe someone more proficient than me reads this and can look into it!
=end

Actions

Also available in: PDF Atom