[GNC] GnuCash_user: rounding errors and significant digits

2023-11-08 Thread Bruce McCoy via gnucash-user
Hi Everyone, Oops. I missed two posts from Jim and did not reply to one other. I apologize for that. Here is a correction. On Oct 8 18:28:00 EDT Jim DeLaHunt wrote:     >I fear that Bruce McCoy pushed this thread     >astray by introducing the phrase "books…     >out of balance". This moved

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-27 Thread R Losey
And to use a concrete example: 1.4 + 1.4 = 2.8 - the sum rounds to 3. If you round the addends, you get 1 + 1 = 2 On Fri, Oct 27, 2023 at 12:07 PM Michael or Penny Novack < stepbystepf...@comcast.net> wrote: > Beating what should be a dead horse. > > Let A, B, and C be rational numbers (ie:

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-27 Thread Michael or Penny Novack
Beating what should be a dead horse. Let A, B, and C be rational numbers (ie: expressed in the form X/Y where X and Y are integers). Let D be a function that represents the decimal equivalent of a rational number to some finite number of decimal places. A + B = C does NOT imply that D(A) +

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-26 Thread Bruce McCoy via gnucash-user
Jim, Thank you for responding. You make valid points.   On Wed, Oct 25 at 9:50 PM Jim DeLaHunt wrote and cited:     >On 2023-10-25 17:00, Bruce McCoy via gnucash-user wrote:     > We also assume that an "exactly precise" number has     the same precision as the smallest currency unit (SCU).   

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-25 Thread Jim DeLaHunt
Bruce: Again, I think you are holding fast to assertions which I think are mistaken, and which lead you to misunderstanding. Let me highlight a few in your most recent message. On 2023-10-25 17:00, Bruce McCoy via gnucash-user wrote: ...In the following, we assume "value/price produces an

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-25 Thread Bruce McCoy via gnucash-user
Hi Everyone, On Sun, Oct 8 at 5:31 AM sunfish62 wrote:     >I'm not sure whose problem is being solved by     >this drawn out discussion.     >     >⁣David T. David, you are right. It is a drawn out discussion. On Sat Oct 7 17:27:29 EDT 2023 Maf. King wrote:     >going around in circles.

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-08 Thread David Carlson
Perhaps the broker overcharged his client. On Sun, Oct 8, 2023 at 4:44 AM Fred Bone wrote: > On 08 October 2023 at 4:13, David Carlson said: > > > Because the broker charged 15,000.00 for 1,377.41 shares? > > Then the effective price paid per share wasn't the stated 10.89 but > slightly more

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-08 Thread Fred Bone
On 08 October 2023 at 4:13, David Carlson said: > Because the broker charged 15,000.00 for 1,377.41 shares? Then the effective price paid per share wasn't the stated 10.89 but slightly more (approx 10.890003702601258884) ___ gnucash-user mailing

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-08 Thread sunfish62--- via gnucash-user
FWIW, Jeff reported his problem in 2014, and was happy when Derek advised him to enter the number of shares and the total dollar amount of the transaction, leaving the price to be calculated. I'm not sure whose problem is being solved by this drawn out discussion. ⁣David T. ​ On Oct 8, 2023,

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-08 Thread David Carlson
Because the broker charged 15,000.00 for 1,377.41 shares? On Sun, Oct 8, 2023, 2:32 AM Fred Bone wrote: > On 08 October 2023 at 1:06, Bruce McCoy said: > > [...] > > > What I do not yet understand is if GnuCash considers a price per share of > > 10.89 to be a precise figure, why GnuCash does

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-08 Thread Fred Bone
On 08 October 2023 at 1:06, Bruce McCoy said: [...] > What I do not yet understand is if GnuCash considers a price per share of > 10.89 to be a precise figure, why GnuCash does not calculate 1,377.41 * > 10.89 = 15,000.00 for Jeff. If GnuCash doesn’t, would we consider making > a change to

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread David Carlson
What you do not understand is that John Ralls and GnuCash recommend entering the total amount and the total number of shares and letting GnuCash calculate the price. THEN there is no error in the account running balance. This is not going to change. On Sat, Oct 7, 2023 at 8:07 PM Bruce McCoy via

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Maf. King, You get the gold star of the day, for the most humerus response. You deserve it. For mistyping “agree” and for poor proofreading, I suppose I’d get the reverse. I deserve it. Best Regards, Bruce | | Virus-free.www.avast.com | ___

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Adrien, I do not know what is happening with the spacing. I do not know what my e-mail client is. And I do not know how to give you a reasonable answer – just to list three things. Best Regards, Bruce | | Virus-free.www.avast.com | ___

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Everyone, On Oct 7, 2023, at 12:39, Bruce McCoy via gnucash-user wrote:     >If I have missed it, please help me. On Sat Oct 7 15:52:28 EDT 2023 John Ralls wrote:     >What you missed is my explanation that if     >user's books are out of balance it's their     >fault, not

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Adrien Monteleone
Bruce, On a side note, (I think John addressed your immediate concern) what in tarnation is your e-mail client? Not only does it oddly removing spacing between words for your own replies, but it seems to now eat spacings between words of other people's replies that you QUOTE!!! Really,

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Everyone, On Sat Oct 7 15:48:25 EDT 2023 John Ralls wrote:     >GnuCash does **NOT** round prices to two decimals.     >Prices are always calculated to the full numeric     >precision of 1/2^64. Amounts and values are what     >get rounded to the respective

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Maf. King
On Saturday, 7 October 2023 20:03:31 BST Bruce McCoy via gnucash-user wrote: > Again,we age. Yes, we do. Too quickly to be going around in circles. ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread john
> On Oct 7, 2023, at 09:54, Bruce McCoy via gnucash-user > wrote: > The books are out of balance when either the “Computing cost of goods sold” > calculations or the “Average Cost price source” differ from the “the trial > balance report” calculations. Both of these are more major points. Is

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread john
> On Oct 7, 2023, at 12:39, Bruce McCoy via gnucash-user > wrote: > > > IfI have missed it, please help me. I do not remember getting an answerto the > question “What are the plans to help our users whose booksare out of balance > by a cent or so?” What you missed is my explanation that

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread john
GnuCash does **NOT** round prices to two decimals. Prices are always calculated to the full numeric precision of 1/2^64. Amounts and values are what get rounded to the respective commodity/currency's smallest unit. Since 15000 and 137741 have no common factors GnuCash will represent that as

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Everyone, OnSat, Oct 7 at 1:25 PM David Carlson wrote: >Howmany times must you bring up the same >non-point? Youare right in that I am addressing a community of people who areinterested in and actively developing GnuCash. As a community, youuse GnuCash and tolerate some of its

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Everyone, David,thank you for responding. I appreciate your input. OnSat, Oct 7 at 1:25 PM David Carlson wrote: >Accordingto my HP handheld calculator, >15,000.00divided by 1,377.41 yields 10.8900.   >Accordingto my hp 49g+ scientific graphing >calculator,15,000.00 divided

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Stan Brown (using GC 4.14)
On 2023-10-07 09:54, Bruce McCoy via gnucash-user wrote: > Our question for discussion is as follows: > >     >What are the plans to help our users whose >     >books are out of balance by a cent or so? In the name of heaven, will you never let it go? How many times must you bring up

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread David Carlson
According to my HP handheld calculator, 15,000.00 divided by 1,377.41 yields 10.8900. According to my hp 49g+ scientific graphing calculator, 15,000.00 divided by 1,377.41 yields 10.8900037026. I defy anyone to pay that amount per share in U.S. currency. I am sure the broker's report showed

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-07 Thread Bruce McCoy via gnucash-user
Hi Everyone, On Fri, Oct 6 at 1:02 PM John Ralls wrote:     >Book out of balance, meaning that the trial balance     >report doesn't balance with the Average Cost price     >source, nearly always results from not computing     >capital gains/losses correctly. Interpret that    

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-06 Thread John Ralls
> On Oct 6, 2023, at 9:39 AM, Bruce McCoy via gnucash-user > wrote: > > Hi Everyone, > On Tue, Sep 26 at 12:50 PM John Ralls wrote:>GnuCash uses a pair of > stack-allocated 128-bit integers (see. . . > > Thanks. Well done. > > > What are the plans to help our users whose books

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-06 Thread Bruce McCoy via gnucash-user
Hi Everyone, On Tue, Sep 26 at 12:50 PM John Ralls wrote:    >GnuCash uses a pair of stack-allocated 128-bit integers (see. . . Thanks. Well done. What are the plans to help our users whose books are out of balance by a cent or so? Best Regards, Bruce | | Virus-free.www.avast.com |

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-10-06 Thread Bruce McCoy via gnucash-user
Hi, On9/25/2023 9:50 PM, Adrien Monteleone wrote:     >you likely can't send zip files through this >mailman instance. OK.I wondered about that. Thanks.     >postthem on a hosting site and simply >paste the links in another reply.  

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-26 Thread Tom Browder
On Tue, Sep 26, 2023 at 11:50 john wrote … Thanks, John—nice work! -Tom ___ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user -

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-26 Thread john
> On Sep 26, 2023, at 08:31, Tom Browder wrote: > > On Mon, Sep 25, 2023 at 20:07 Bruce McCoy via gnucash-user < > gnucash-user@gnucash.org> wrote: > ...discussion of GnuCash's handling of numbers... > > Does GnuCash use the Gnu Multiple Precision Arithmetic (GMP) library? No. Like all

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-26 Thread Tom Browder
On Mon, Sep 25, 2023 at 20:07 Bruce McCoy via gnucash-user < gnucash-user@gnucash.org> wrote: ...discussion of GnuCash's handling of numbers... Does GnuCash use the Gnu Multiple Precision Arithmetic (GMP) library? -Tom ___ gnucash-user mailing list

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-26 Thread Michael or Penny Novack
On 9/25/2023 9:50 PM, Adrien Monteleone wrote: It still did not come through as you likely can't send zip files through this mailman instance. What exactly are you sending, just images? Attach them individually, or else post them on a hosting site and simply paste the links in another reply.

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-25 Thread Adrien Monteleone
It still did not come through as you likely can't send zip files through this mailman instance. What exactly are you sending, just images? Attach them individually, or else post them on a hosting site and simply paste the links in another reply. --- And it seems at least in this last

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-25 Thread Bruce McCoy via gnucash-user
 Hi everybody, Since this is a relatively long post, there are summaries at each end. The first section runs through "Old Business." The second section starts with "New Business."  The third section is just the attachment. To see the illustrations, please unzip the attachment,if present.

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-25 Thread Bruce McCoy via gnucash-user
Hieverybody, Sincethis is a relatively long post, there are summaries at each end. Thefirst section runs through "Old Business." The secondsection starts with "New Business." The third section isjust the attachment. To see the illustrations, please unzip theattachment,if present.

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-25 Thread Bruce McCoy via gnucash-user
Hieverybody, Congratulationson releasing GnuCash 5.4. You are doing excellent work. Thank you somuch. Sincethis is a relatively long post, there are summaries at each end. Thefirst section runs through "Old Business." The secondsection starts with "New Business." The third section

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-14 Thread Jim DeLaHunt
Bruce: On 2023-09-14 14:51, Bruce McCoy via gnucash-user wrote: ...Whatare some of the options available to GnuCash programmers today toimprove precision? Here is one group [Long list of arithmetic libraries elided] Wait, you skipped a step. You have still not demonstrated that the

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-14 Thread Bruce McCoy via gnucash-user
Jim, Whatare some of the options available to GnuCash programmers today toimprove precision? Here is one group. Decimal-FloatingArithmetic GeneralDecimal Arithmetic http://speleotrove.com/decimal http://speleotrove.com/decimal/#decNumber http://speleotrove.com/decimal/#links

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-13 Thread Jim DeLaHunt
Hello again, Bruce! I can point out a logic error in your argument here. On 2023-09-13 17:28, Bruce McCoy via gnucash-user wrote: ...Yousay that 3750/599 is "the more accurate." How precise isit? Let's see. 2.396shares * (3750/599) $/share = 2.396 shares

Re: [GNC] GnuCash_user: rounding errors and significant digits

2023-09-13 Thread Bruce McCoy via gnucash-user
Jim, Inyour response of Mon, Aug 21, 2023 at 5:00 PM via GnuCash-user yousaid: "Logically,$value = $price/share * #shares, and this should be preciseequality." GnuCash“stores the price as a rational number, a ratio between numeratorand denominator,” "price= 15000/2396 =

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-09 Thread Jim DeLaHunt
Hello, Bruce: I would like to reply to a few places in your detailed message where I think I can clarify the argument. On 2023-09-09 10:59, Bruce McCoy via gnucash-user wrote:     "he actual $value of this $price and #shares is $14.99896, a difference of $0.00104." At the moment,

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-09 Thread Stan Brown (using GC 4.14)
On 2023-09-09 12:19, Ken Farley wrote: > I really don't see what is so difficult to understand about this. > > The key equation is AMOUNT = PRICE * SHARES > > Gnucash works under the philosophy that two of those terms must be > maintained precisely: > > AMOUNT - the total cost of the

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-09 Thread john
Bruce, I don't know who this "Jim" is, their replies are not making it to the list. Unfortunately their understanding of GnuCash's handling of amount, value, and price is flawed. Amount is the quantity of a split in the split account's commodity. Value is that amount converted to the

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-09 Thread Ken Farley
I really don't see what is so difficult to understand about this. The key equation is AMOUNT = PRICE * SHARES Gnucash works under the philosophy that two of those terms must be maintained precisely: AMOUNT - the total cost of the transaction. What you ultimately paid in the currency of your

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-09 Thread Bruce McCoy via gnucash-user
Jim,      Thank you for your response of Mon, Aug 21, 2023 at 5:00 PM via GnuCash-user.   In it you said:     "Logically, $value = $price/share * #shares, and this should be precise equality."   This is certainly true.   And accuracy is a top consideration in a financial program.         

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-09-08 Thread Bruce McCoy via gnucash-user
Jim, Whata pleasure to read your response. What a pause before my response. Youare kind enough to say: Iam interested by your statement, "results in gnucash reducingthe shares in the fund by 2.4". GnuCash is capable of storingshare counts to three decimal places. However, a  

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-08-21 Thread Jim DeLaHunt
Bruce: Welcome to the gnucash-user email list! Hopefully we can give you some useful answers. I will answer based on what I have heard developers say on the list, and what I see in my stock transactions in GnuCash, though I have not read the relevant GnuCash source code. On 2023-08-21

[GNC] gnucash_user: rounding errors and significant digits

2023-08-21 Thread Bruce McCoy via gnucash-user
Bruce, please include the user list in your replies.  Then others are kept in the loop.  I am copying your reply here this time. Also, I am at my computer with a real keyboard so I will hopefully avoid fat finger mistakes.  Your rhetorical questions do not have good answers.  Historically,

Re: [GNC] gnucash_user: rounding errors and significant digits

2023-08-21 Thread David Carlson
The developers can give you a more detailed answer, but in fact GnuCash carries much more prrcision inyernally. To get the best results, enter number of shares and total currency then let GnuCash calculate the price. That usually allows GnuCash reports To mstch your brokers reports. On Mon,

[GNC] gnucash_user: rounding errors and significant digits

2023-08-21 Thread Bruce McCoy via gnucash-user
Greetings to all of you,   Ingnucash, you have developed a wonderful program. Thank you.   Greatis my anticipation for using it, although there is at least one areaI do not understand. Could you please help me comprehend what ishappening in the calculations of gnucash compared with