You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Joan Schipper (JIRA)" <ji...@apache.org> on 2009/10/24 16:37:59 UTC
[jira] Created: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
--------------------------------------------------------------------------------------------------------------
Key: MATH-307
URL: https://issues.apache.org/jira/browse/MATH-307
Project: Commons Math
Issue Type: Bug
Affects Versions: 2.0
Environment: independent
Reporter: Joan Schipper
Fix For: 1.2
BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
(Exception: no exact representable decimal result)
The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794741#action_12794741 ]
Luc Maisonobe commented on MATH-307:
------------------------------------
Oops. Sorry for having forgotten this ... I've checked it in now.
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz closed MATH-307.
----------------------------
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MATH-307) BigReal/Fieldelement divide
without setting a proper scale -> exception: no exact representable decimal
result
Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794725#action_12794725 ]
Luc Maisonobe edited comment on MATH-307 at 12/27/09 8:05 PM:
--------------------------------------------------------------
I have added rounding mode and scale fields in BigReal in subversion tree as of r894107.
Could you please check if this solves the issue for you ?
was (Author: luc):
I have added rounding mode and scale fields in BigDecimal in subversion tree as of r894107.
Could you please check if this solves the issue for you ?
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Joan Schipper (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794738#action_12794738 ]
Joan Schipper commented on MATH-307:
------------------------------------
Thank you for your reply and effort.
If this method is replaced for the implementation of scale and roundingMode it will certainly work:
old method:
public BigReal divide(BigReal a) throws ArithmeticException {
return new BigReal(d.divide(a.d));
}
suggested method:
public BigReal divide(BigReal a) throws ArithmeticException {
return new BigReal(d.divide(a.d, scale, roundingMode));
}
Joan
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Joan Schipper (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794739#action_12794739 ]
Joan Schipper commented on MATH-307:
------------------------------------
Thank you for your reply and effort.
If this method is replaced for the implementation of scale and
roundingMode it will certainly work:
public BigReal divide(BigReal a) throws ArithmeticException {
return new BigReal(d.divide(a.d));
}
is replaced by:
public BigReal divide(BigReal a) throws ArithmeticException {
return new BigReal(d.divide(a.d, scale, roundingMode));
}
Joan
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz updated MATH-307:
-----------------------------
Description:
BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
(Exception: no exact representable decimal result)
The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
was:
BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
(Exception: no exact representable decimal result)
The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
Fix Version/s: (was: 1.2)
2.1
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12794725#action_12794725 ]
Luc Maisonobe commented on MATH-307:
------------------------------------
I have added rounding mode and scale fields in BigDecimal in subversion tree as of r894107.
Could you please check if this solves the issue for you ?
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MATH-307) BigReal/Fieldelement divide without
setting a proper scale -> exception: no exact representable decimal result
Posted by "Luc Maisonobe (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MATH-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Luc Maisonobe resolved MATH-307.
--------------------------------
Resolution: Fixed
Fixed since 2009-12-27 as of r894109
> BigReal/Fieldelement divide without setting a proper scale -> exception: no exact representable decimal result
> --------------------------------------------------------------------------------------------------------------
>
> Key: MATH-307
> URL: https://issues.apache.org/jira/browse/MATH-307
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: independent
> Reporter: Joan Schipper
> Fix For: 2.1
>
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> BigReal implements the methode divide of Fieldelement. The problem is that there is no scale defined for the BigDecimal so the class will throw an error when the outcome is not a representable decimal result.
> (Exception: no exact representable decimal result)
> The workaround for me was to copy the BigReal and set the scale and roundingMode the same as version 1.2.
> Maybe is it possible to set the scale in FieldMatrix and implements it also a divide(BigReal b, int scale, int roundMode) ??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.