[Ironpython-users] IronPython, Daily Digest 6/2/2012

no_reply at codeplex.com no_reply at codeplex.com
Sun Jun 3 19:27:13 CEST 2012


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] Wrong Result when evaluating expression like "1\80"
2. [Status update] Wrong Result when evaluating expression like "1/80"

----------------------------------------------

ISSUES

1. [New issue] Wrong Result when evaluating expression like "1\80"
http://ironpython.codeplex.com/workitem/32798
User JMJC has proposed the issue:

"Good morning

The following code gives me a result of zero but it should be 0.0125

 ScriptEngine engine = Python.CreateEngine();
 string expression = @"1/80";
 ScriptSource source = engine.CreateScriptSourceFromString(expression);

var res = source.Execute();

Can you please tell me if i'm doing anything wrong or is it a bug?


Regards
JC"-----------------

2. [Status update] Wrong Result when evaluating expression like "1/80"
http://ironpython.codeplex.com/workitem/32798
User slide_o_mix has updated the issue:
Status has changed from Proposed to Closed with the following comment, 

"You are dividing two integers, so you get integer division. If you run under CPython, you get the same result:

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1/80
0

If you force double/float division you get what you are looking for.

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> 1/80.0
0.0125


On IronPython, the result will be slightly different because of .NET's rounding and precision."
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120603/faea4c6b/attachment.html>


More information about the Ironpython-users mailing list