
pkfox wrote: multiply
You meant "add"?





I did thanks
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity.  Hunter S Thompson  RIP





And accountants be like "your infinite number has a rounding error and now the books are off!"





I would not consider 1/7 or its decimal equivalent an infinite number. I think technically it is a rational number.
Unless you are using a special library, then computers (and especially databases) don’t deal that well with these types of numbers.
This is why there are fixed decimals that always round in favor of the bank.





englebart wrote: This is why there are fixed decimals that always round in favor of the bank.
This is incorrect. Bank accounts use "round to nearest or away", where fractional cents are rounded to the nearest value (up or down). If the residue is exactly 0.5 cents, the number is rounded "away"  up for positive, down for negative.
If you are running a credit, this gives you a tiny statistical advantage. If you are running a debit, this gives the bank a tiny statistical advantage. In neither case is this likely to have a measurable effect, unless you aggregate over billions of operations a day.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
 6079 Smith W.





Daniel Pfeffer wrote: Bank accounts use "round to nearest or away", where fractional cents are rounded to the nearest value (up or down)
I couldn't find any regulation that specifies how banks round numbers.
And given 'banks' exist throughout the world I suspect certainly in some places rounding might use different rules.
I worked for a financial company (not a bank) and the rounding was decided by me.
There are multiple rules.
Last time I looked (and can recall) there are three different types of rounding suited to financial transactions. Rather than scientific. Although one of those might also be scientific.
Two of them provide 'better' results than just rounding up on '0.5' otherwise down. Which I suspect you are referring to. That specific method tends to favor a specific result. Because there are 6 digits from 59 but only 4 from 04.





Here you are: Converting to the euro
When the EU introduced the Euro, conversion from the national currencies to the Euro was done using to the rule that I mentioned (perform the calculation exactly, then round to 2 decimal places using 'round to nearest or away'). I assumed that this was the rule used by most banking operations.
Note that the IEEE Std 7542019 FloatingPoint Standard specifies decimal, as well as binary, floatingpoint. Parts of the decimal specification (e.g. the "quantum" concept, and 'round to even or away') were added specifically in order to ease the decimal calculations performed by banks.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
 6079 Smith W.





Daniel Pfeffer wrote: Here you are
Which supports exactly what I said.
Are there ways to round currencies  yes.
Is there more than one way to do it  yes.
I stated both of those.
How does one decide which to use? By law, regulation or just by picking one.
You provided an example where the method was specified for the very specific case.
It specifically supports the different choices also. The following is a way to round currencies:
"it is prohibited to round or truncate the conversion rate."
Instead it provides the rule to be used:
"if the number in the third decimal place is less than 5..."
But it also recognizes other possibilities with the following:
"Introduction of the euro may not alter the terms of legal instruments, "
And this:
"National law can bring more detail to rules on rounding as long as this leads to a higher degree of accuracy."
Daniel Pfeffer wrote: Note that the IEEE Std 7542019
You are merely pointing out ways that one can do it. Which I already said exist.





Explain the problem?
A lot that is infinite to us, can be rounded.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics."  Some Bell.





I was told there would be no math.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix





I think this is closer to philosophy than maths. Certainly a long was from the arithmetic I learned in school!





Instead, realize that there is no math spoon
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.





So how do you put a 3 at the nonexistent 'end' of an infinite sequence?
There are no solutions, only tradeoffs.  Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do.  Calvin (Bill Watterson, Calvin & Hobbes)





Start with the 3 and just prefix it repeatedly!





StarNamer@work wrote: But what if you take that the repeating 6 digit sequence indicated and repeat it infinitely to the right followed by a 3.
But you can't. If you repeat it infinitely that means there's always another digit. When you try and add it to the "end", there's always another digit after that spot, so you're not at the end.
StarNamer@work wrote: That is clearly an infinity (it has infinitely many digits!),
Not quite. It doesn't mean the result is infinite, just that there's no finite representation in base 10.
There are actually many different "infinities". The numbers 1,2,3...is an infinite set. The set of real numbers between 1 and 2 (eg 1.1, 1.01, 1.001 and on and on) is also infinite, and large than the set of integers. One infinity can be bigger than another infinity. Even though they are both infinite.
This is why mathematicians never need to do drugs.
cheers
Chris Maunder





Chris Maunder wrote: But you can't. If you repeat it infinitely that means there's always another digit. When you try and add it to the "end", there's always another digit after that spot, so you're not at the end. Start with the 3 and just prefix it repeatedly!





Chris Maunder wrote: This is why mathematicians never need to do drugs. Are you sure? It would be possible that they are always under the effect of drugs... like Obelix, but instead of falling in the cauldron of magic potion, they fell into the cauldron of LSD
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.





Chris Maunder wrote: There are actually many different "infinities". The numbers 1,2,3...is an infinite set. The set of real numbers between 1 and 2 (eg 1.1, 1.01, 1.001 and on and on) is also infinite, and large than the set of integers. One infinity can be bigger than another infinity. Even though they are both infinite. Actually, I've never been totally convinced of this, although I'm open to it being proved in some way.
The only way I've ever seen is Cantor's Diagonalization, which says to take a list of all the Real (Rational plus Transcendental, etc) numbers between zero and one then to create a new number by taking the first decimal digit of the first number, second decimal digit of the second number, third of the third, etc. The argument is that this number cannot be on the list, so therefore you can put the infinite number of Reals into correspondence with the Integers so there there is at least a Countable infinity (number of integers) and an Uncountable infinity (number of Reals).
My scepticism comes from the statement about creating the list of Reals. I'd like to use the following pseudo code:
reals = New List<Real>
reals.Add(0.1)
reals.Add(0.5)
reals.Add(pi)
// as many as you want
repeat forever // until list is complete
for each number r in reals
x = new real
for each decimal digit p of r
digit p of x = not_the_same_as(digit q of r) // function elsewhere
if x not in reals
reals.Add(x)
else
terminate // countable list of reals is complete My point is that this procedure *is* Cantor's Diagonalization so if that can find another Real to add, then the list building shouldn't have terminated and, if it can't, then it's not been proved that there are more Reals than Integers. It may be true, but this doesn't prove it.
I feel sure there must be an alternative proof to Cantor's, but I've never found it. Perhaps it relies on maths I've never encountered and would need a degree in Mathematics to understand! (Mine was Physics! )
FYI, I recall I once saw a proof that there are more Transcendental numbers (like pi or e) than Rational numbers (like 1/5, 3/7, etc) but can't recall if it was also based on Cantor's method.
modified 5Nov23 13:24pm.





StarNamer@work wrote: It may be true, but this doesn't prove it.
Interesting argument.
However it fails from the concept of terms versus proof.
An infinite series is just a concept. Since of course you can't reach the end. As you are suggesting. So one must accept the concept without enumerating the set.
But once one accepts the concept then one can discuss it. Thus there is a set that does have all of the numbers (but still conceptually infinite) and thus there can be a comparative enumeration using the other set.





Infinity is a very tricky concept, and you have misunderstood it.
You cannot add anything to the "end" of an infinite sequence  it has no "end". It is as ridiculous as claiming that your password is the last eight digits of Pi.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
 6079 Smith W.





Daniel Pfeffer wrote: You cannot add anything to the "end" of an infinite sequence  it has no "end". Start with the 3 and just prefix it repeatedly!





Daniel Pfeffer wrote: your password is the last eight digits of Pi. Time to change my password again.





You may just got confused with infinity (which is an idea and can not be use as a number) and a fraction that has infinite decimal digits...
Obviously you cannot compute anything with the decimal representation of that fraction as by its nature it will take up infinite time to do so...
The problem is that you decided to cut the flow of infinite decimal digits and make a computation based on that... Depending on where you stop counting the digits you will have different results...
0.1428573 * 7 = 1.0000011
0.14285731428573 * 7 = 1.00000120000011

0.142857 * 7 = 0.999999
0.142857142857 * 7 = 0.999999999999
And so on... There is no justification at any point to say those two numbers are the same...
(Think about the division by zero)
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." ― Gerald Weinberg





I missed out all the boilerplate phrases along the lines of "As you increase the number of digits 7*0.14285714... tends towards 1 so, in the limit, is assumed to be 1...", etc.
Kornfeld Eliyahu Peter wrote: 0.1428573 * 7 = 1.0000011
0.14285731428573 * 7 = 1.00000120000011

0.142857 * 7 = 0.999999
0.142857142857 * 7 = 0.999999999999 You've misread the first number (second in my message). It's...
........2857142857142857142857142857143
or
........2857142857142857142857142857142857142857142857142857142857143
That is, an integer with an infinite number of repetitions of ...285714... followed by 3. Although there's a notation for recurring decimals, I don't know of a shorthand for a padic number (which is what this is).
The point is that I (and the video) didn't suggest stopping the calculation at any point. Obviously, if you do they aren't the same and, in the case of the 'infinite' integer, you don't actually have a result! It's only if you project to the theoretical limit that the results are equivalent.
Many years ago, I researched for a PhD in Nuclear Structure Physics and studied some HighEnergy (particle) Physics so am aware of renormalization to get rid of infinites in theories, the meaning (or lack of it) of anything divided by zero, etc.
I'd just never encountered padic numbers[^] before I watched that video[^].





StarNamer@work wrote: Many years ago, I researched for a PhD in Nuclear Structure Physics and studied some HighEnergy (particle) Physics so am aware of renormalization to get rid of infinites in theories, the meaning (or lack of it) of anything divided by zero, etc.
As you are no doubt aware, there are no infinities in nature. Any infinity that does turn up in our theories is a sign that the theory is incomplete. Renormalization is a clever mathematical trick that allows us to make predictions without having a complete theory, but one must remember its limitations  it is a mathematical trick, not part of a correct description of nature.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
 6079 Smith W.



