[Desktop-packages] [Bug 1161670] Re: Order of operations is incorrect for exponents and parentheses

2016-10-05 Thread madbiologist
The gcalctool in Ubuntu 12.04 "Precise Pangolin" is a transitional
package for the GNOME desktop calculator. In Ubuntu 14.04 "Trusty Tahr"
and later, GNOME desktop calculator is called gnome-calculator. gnome-
calculator 1:3.10.3-0ubuntu0.1.1 in Ubuntu 14.04 "Trusty Tahr" evaluates
all of your examples as you expect it to.

** Changed in: gcalctool (Ubuntu)
   Status: New => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gcalctool in Ubuntu.
https://bugs.launchpad.net/bugs/1161670

Title:
  Order of operations is incorrect for exponents and parentheses

Status in gcalctool package in Ubuntu:
  Fix Released

Bug description:
  When using both parenteses and exponents, the calculator does not
  always follow standard order of operations.

  Order of operations:  
  1) Parentheses - simplify anything possible within grouping symbols
  2) Exponents - unless grouping symbols are used, only the number directly 
following the carat should be treated as an exponent.  
  3) Multiplication or Division - whichever occurs first when reading from left 
to right.  Parentheses are a mathematically accepted way of representing 
multiplication.
  4) Addition or Subtraction - whichever occurs first when reading from left to 
right.

  Ex:  3^2*7 yields 63, yet 3^2(7) yields 4782969.  Both * and ( ) are
  acceptable mathematical tools for multiplication, so they should not
  give two different results.

  Ex:  25000(1.01)^20 gives an inaccurate answer.  Order of
  operations is invalid.  The calculator multiplies the 25000 by the
  1.01 before utilizing the exponent.  Exponents come before
  multiplying, and thus 1.01 should be raised to the 20th power before
  multiplying by 25000.

  Ex:  3^2pi should yield 9pi because exponents trump multiplication.
  However, the calculator treats this as 3^(2pi), and yields
  995.041644893

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: gcalctool 6.4.1.1-0ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-39.62-generic 3.2.39
  Uname: Linux 3.2.0-39-generic x86_64
  NonfreeKernelModules: openafs
  ApportVersion: 2.0.1-0ubuntu17.1
  Architecture: amd64
  Date: Thu Mar 28 19:57:12 2013
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=en_US.UTF-8
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcalctool
  UpgradeStatus: Upgraded to precise on 2012-12-23 (95 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/1161670/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1161670] Re: Order of operations is incorrect for exponents and parentheses

2016-10-05 Thread madbiologist
Upon further reading, it seems your third example is valid.  One must
use parentheses if the entire exponent is 2π, as in 3^(2pi), otherwise
3^2pi should evaluate to 9pi as you said.

Also from the same further reading, using your second example, if not
wanting to simply write/enter 25000*1.01^20 we should use
(25000)(1.01)^20.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gcalctool in Ubuntu.
https://bugs.launchpad.net/bugs/1161670

Title:
  Order of operations is incorrect for exponents and parentheses

Status in gcalctool package in Ubuntu:
  New

Bug description:
  When using both parenteses and exponents, the calculator does not
  always follow standard order of operations.

  Order of operations:  
  1) Parentheses - simplify anything possible within grouping symbols
  2) Exponents - unless grouping symbols are used, only the number directly 
following the carat should be treated as an exponent.  
  3) Multiplication or Division - whichever occurs first when reading from left 
to right.  Parentheses are a mathematically accepted way of representing 
multiplication.
  4) Addition or Subtraction - whichever occurs first when reading from left to 
right.

  Ex:  3^2*7 yields 63, yet 3^2(7) yields 4782969.  Both * and ( ) are
  acceptable mathematical tools for multiplication, so they should not
  give two different results.

  Ex:  25000(1.01)^20 gives an inaccurate answer.  Order of
  operations is invalid.  The calculator multiplies the 25000 by the
  1.01 before utilizing the exponent.  Exponents come before
  multiplying, and thus 1.01 should be raised to the 20th power before
  multiplying by 25000.

  Ex:  3^2pi should yield 9pi because exponents trump multiplication.
  However, the calculator treats this as 3^(2pi), and yields
  995.041644893

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: gcalctool 6.4.1.1-0ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-39.62-generic 3.2.39
  Uname: Linux 3.2.0-39-generic x86_64
  NonfreeKernelModules: openafs
  ApportVersion: 2.0.1-0ubuntu17.1
  Architecture: amd64
  Date: Thu Mar 28 19:57:12 2013
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=en_US.UTF-8
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcalctool
  UpgradeStatus: Upgraded to precise on 2012-12-23 (95 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/1161670/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1161670] Re: Order of operations is incorrect for exponents and parentheses

2016-10-05 Thread madbiologist
AFAIK and IIRC, parentheses are not the equivalent of a multiplication
symbol.  It is simply mathematical conventiont to omit the
multiplication symbol between two variables, between a constant and a
variable, and between a constant or variable and an operator such as (
or Σ.

Note that your first two examples are resolved if you stop using
parentheses where they are unnecessary.

The fundamental issue here is the ambiguity caused by a lack of
superscript. I've attached an example of what I'm talking about.

** Attachment added: "math.docx"
   
https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/1161670/+attachment/4755032/+files/math.docx

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gcalctool in Ubuntu.
https://bugs.launchpad.net/bugs/1161670

Title:
  Order of operations is incorrect for exponents and parentheses

Status in gcalctool package in Ubuntu:
  New

Bug description:
  When using both parenteses and exponents, the calculator does not
  always follow standard order of operations.

  Order of operations:  
  1) Parentheses - simplify anything possible within grouping symbols
  2) Exponents - unless grouping symbols are used, only the number directly 
following the carat should be treated as an exponent.  
  3) Multiplication or Division - whichever occurs first when reading from left 
to right.  Parentheses are a mathematically accepted way of representing 
multiplication.
  4) Addition or Subtraction - whichever occurs first when reading from left to 
right.

  Ex:  3^2*7 yields 63, yet 3^2(7) yields 4782969.  Both * and ( ) are
  acceptable mathematical tools for multiplication, so they should not
  give two different results.

  Ex:  25000(1.01)^20 gives an inaccurate answer.  Order of
  operations is invalid.  The calculator multiplies the 25000 by the
  1.01 before utilizing the exponent.  Exponents come before
  multiplying, and thus 1.01 should be raised to the 20th power before
  multiplying by 25000.

  Ex:  3^2pi should yield 9pi because exponents trump multiplication.
  However, the calculator treats this as 3^(2pi), and yields
  995.041644893

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: gcalctool 6.4.1.1-0ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-39.62-generic 3.2.39
  Uname: Linux 3.2.0-39-generic x86_64
  NonfreeKernelModules: openafs
  ApportVersion: 2.0.1-0ubuntu17.1
  Architecture: amd64
  Date: Thu Mar 28 19:57:12 2013
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=en_US.UTF-8
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcalctool
  UpgradeStatus: Upgraded to precise on 2012-12-23 (95 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/1161670/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1161670] Re: Order of operations is incorrect for exponents and parentheses

2016-10-05 Thread madbiologist
Also see the first, second and fourth paragraphs of
https://math.berkeley.edu/~gbergman/misc/numbers/ord_ops.html

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gcalctool in Ubuntu.
https://bugs.launchpad.net/bugs/1161670

Title:
  Order of operations is incorrect for exponents and parentheses

Status in gcalctool package in Ubuntu:
  New

Bug description:
  When using both parenteses and exponents, the calculator does not
  always follow standard order of operations.

  Order of operations:  
  1) Parentheses - simplify anything possible within grouping symbols
  2) Exponents - unless grouping symbols are used, only the number directly 
following the carat should be treated as an exponent.  
  3) Multiplication or Division - whichever occurs first when reading from left 
to right.  Parentheses are a mathematically accepted way of representing 
multiplication.
  4) Addition or Subtraction - whichever occurs first when reading from left to 
right.

  Ex:  3^2*7 yields 63, yet 3^2(7) yields 4782969.  Both * and ( ) are
  acceptable mathematical tools for multiplication, so they should not
  give two different results.

  Ex:  25000(1.01)^20 gives an inaccurate answer.  Order of
  operations is invalid.  The calculator multiplies the 25000 by the
  1.01 before utilizing the exponent.  Exponents come before
  multiplying, and thus 1.01 should be raised to the 20th power before
  multiplying by 25000.

  Ex:  3^2pi should yield 9pi because exponents trump multiplication.
  However, the calculator treats this as 3^(2pi), and yields
  995.041644893

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: gcalctool 6.4.1.1-0ubuntu3
  ProcVersionSignature: Ubuntu 3.2.0-39.62-generic 3.2.39
  Uname: Linux 3.2.0-39-generic x86_64
  NonfreeKernelModules: openafs
  ApportVersion: 2.0.1-0ubuntu17.1
  Architecture: amd64
  Date: Thu Mar 28 19:57:12 2013
  MarkForUpload: True
  ProcEnviron:
   LANGUAGE=en_US.UTF-8
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: gcalctool
  UpgradeStatus: Upgraded to precise on 2012-12-23 (95 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcalctool/+bug/1161670/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp