[Bugs] #4811 Sugar UNSP: Function b10bin(x) in Calculator Activity does not give desired output
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Mon Jan 19 13:04:25 EST 2015
#4811: Function b10bin(x) in Calculator Activity does not give desired output
----------------------------------------+-------------------------------
Reporter: gauravm043 | Owner: gauravm043
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: Unspecified
Component: Sugar | Version: Unspecified
Severity: Unspecified | Resolution:
Keywords: Calculate Activity | Distribution/OS: Ubuntu
Bug Status: Unconfirmed |
----------------------------------------+-------------------------------
\
\
\
\
\
\
Description changed by gauravm043:
\
Old description:
> Function b10bin() in Calculator is supposed to return decimal value of a
> binary number given as input but it is returning
>
> b10bin(1111) = 23 Correct
> b10bin(1000) = 1 Incorrect
> b10bin(1010) = 5 Incorrect
>
> There is a need to correct the function Implementation.
New description:
Function b10bin() in Calculator is supposed to return decimal value of a
binary number given as input but it is returning
b10bin(1111) = 23 Correct
b10bin(1000) = 1 Incorrect
b10bin(1010) = 5 Incorrect
There is a need to correct the function Implementation, The problem is
more because of the fact that if we do b10bin(011) then the number 011 is
first treated as octal and number 9 (decimal equivalent of 011) is being
sent as input.
--
\
\
\
\
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/4811#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list