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.
_______________________________________________
Ironpython-users mailing list
Ironpython-users@python.org
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to