Closed TechnVision closed 1 year ago
"B" for Brackets, which in Primary School means "inside the Brackets" is replaced in High School with "solve Brackets". i.e. if there are still brackets there, then you're not done with solving brackets yet.
Let me literally translate the text I linked earlier:
If the expression contains parentheses, you resolve the contents of the parentheses first. Parentheses can be in several levels, always proceed from inner to outer parentheses (or from round to square to compound parentheses).
We never override this rule later. It explicitly states contents of the parentheses, nothing about multiplier in front of them. Implicit multiplication is still treated as multiplication, parentheses around a number can be removed if it's a separate term. We intentionally leave this ambiguous and undefined and we understand that it's ambiguous. I don't think the burden of proof is on me to prove you that's how we are taught.
I don't think there was any case in math where we would go back and say that what we learned was wrong and redefine it. We do, however, constrain the previously learned logic to certain domain, like the "real numbers".
We are not thought about parse trees until much later, and we write most expressions on paper where some of the ambiguity is resolved by writing division vertically instead of using division symbol in single line. That's why we don't NEED to dive too deep into the ambiguities because you are unlikely to experience them, not in elementary school and not in high school.
No-one has yet cited any contrary textbook.
It is your claim that this is universal. And you have not cited anything yet.
I've cited my thread multiple times, specifically pointing out that it has textbook references in it. As far as I can tell, no-one bothered to even look at it.
But that's not .net, c# or this runtime :)
Ok, so speaking of C# and the runtime (which is why I made my initial point about brackets, hoping someone relevant at MS might see it, cos MS and other calculators giving wrong answers is the bane of my teaching existence) should a(b) be handled by the runtime, or the programmer? Because I BELIEVE that there are some languages which DO support this (I don't recall which, but I've been told that some do). Regardless of whether the dotnet runtime should support that or not, at least MS programmers could freshen up their HS Maths skills so that they don't keep publishing calculators which give wrong answers. That is my eternal (but possibly futile) hope... (sigh)
I've cited my thread multiple times, specifically pointing out that it has textbook references in it. As far as I can tell, no-one bothered to even look at it.
I looked at it. None of your own links supply evidence for the claims you've made wrt rounding.
should a(b) be handled by the runtime
a(b)
is an invocation of the a
method with b
as an argument to it as far as C# is concerned.
so that they don't keep publishing calculators which give wrong answers
C# and the .net runtime have absolutely nothing to do with the published calculators and the interpretation they make for particular sequences of mathematical symbols. You are welcome to give your feedback to those teams yourself.
C# concerns itself with the rules of the c# language. And the runtime concerns itself with evaluating the sequence of instructions a c# program compiles down to.
Again, i tried to steelman your argument @SmartmanApps . I genuinely looked in as many places as i could. I coudl find nothing backing up your position on rounding. Truly, literally nothing. Not even a blog post. Not even a random post by someone going "hey, i think this would make more sense". Instead, what i found was an enormous amount of information (including published papers) talking about the topic and giving deeply investigated and justified reasoning in this area. The information was published by experts in the fields of mathematics, computing, accounting, etc. and all seemed to contradict you.
So what am i to think? I can't find anything supporting your position (and you're not linking to it either). And the wealth of waht i can find disagrees with you. The only justification i keep seeing parroted is that you teach things are particular way to year-7 students, and thus that's the only way things should be done. But i've given the reasons on why that simply makes no sense, unless one wants to argue that the math and systems that a year-7 student knows and understands is how things should work everywhere. Clearly that's not the case with even the most cursory examination, so the argument falls completely flat in this domain from the start. :-/
should a(b) be handled by the runtime
a(b)
is an invocation of thea
method withb
as an argument to it as far as C# is concerned.
The topic is Maths, not methods.
int a=1 int b=3 int answer=a(b)
You are welcome to give your feedback to those teams yourself.
I would if I knew how to! Windows calculator, Excel, MS Maths Solver - who are the contacts?
You said:
Ok, so speaking of C# and the runtime
So in the context of C# and the runtime, this is a method call. If you want to discuss math, then that's something different.
int a=1
int b=3
int answer=a(b)
This would not be legal as an integer cannot be invoked. You can see that here: https://sharplab.io/#v2:EYLgZgpghgLgrgJwgZwLQGED2AbbEDGMAlpgHYAyRMECU2yANDCEdgD4ACATAIwCwAKA4BmAATdR6UQG9Bo+eLEcALKICyACgCUMuQv1FSMUVAC8PANx798w8eCnhVgTYV2TpZAHcapqBuAtZ30AX0EQoA==
If you want to discuss c#, then please update your example to be legal, and we can discuss waht it means.
If you want to discuss math, then that's fine too. But we'll have to agree on what a particular piece of syntax means as different math systems do not agree on this.
Windows calculator
Excel
You should be able to send feedback from within excel.
MS Math solver
Let me literally translate the text I linked earlier:
Ok, effort appreciated.
If the expression contains parentheses, you resolve the contents of the parentheses first. Parentheses can be in several levels, always proceed from inner to outer parentheses (or from round to square to compound parentheses).
We never override this rule later.
Well that's definitely not correct then - otherwise how would you know what to do with a(b)? Or for that matter (a+b)(c+d)? There are whole chapters on expanding brackets in textbooks (first single brackets, then double brackets, then more), and it seems to me you're saying you never teach how to expand brackets? a(b+c) is the same as (a+0)(b+c). I discussed this just last week in my thread.
Implicit multiplication is still treated as multiplication,
Look up a chapter which talks about Terms. ab isn't "implicit multiplication", it's a Term.
parentheses around a number can be removed if it's a separate term
Exactly! And a(b) ISN'T a separate term. We can't remove brackets until you have Distributed a and reduced it to 1 term INSIDE the brackets. i.e. a(b)=(a*b)=(ab)=ab=whatever ab equals, which is a single term.
I don't think there was any case in math where we would go back and say that what we learned was wrong and redefine it.
"no such thing as a square root of a negative number" - in University they tell you that was wrong and teach you about complex numbers.
"no such thing as a square root of a negative number" - in University they tell you that was wrong and teach you about complex numbers.
Pinged my math teacher friend. They definitely do not teach that. They just say: it's something you won't know how to do yet, but will learn about later.
My recollection was also learning this, well before university (and well before HS as well). Likely in the algebra-2 classes IIRC.
Well that's definitely not correct then
You're being circular with your definitions. You're only allowing for correctness to be how you do it. And then say that everyone agrees on this. But when people point out other places taht don't agree and do it differently, you just say they're not correct.
You can't have it both ways. You can't both say that there's all agreement on this, and then just ignore that that is nto the case. You can certainly think that your way is superior. But that's an entirely different argument, and is now down to whatever particular positives/negatives people have about the particular different systems. As has been shown numerous times now, there is not agreement here, and your particular book's approach to year-7 math is just one.
int a=1 int b=3 int answer=a(b)
This would not be legal as an integer cannot be invoked.
I'm NOT invoking a - I'm solving a(b). This was my point earlier that (I'm told) there are other languages that DO support this. i.e. expanding brackets in a Maths expression. i.e. int=int(int). I'm raising that as a point to consider supporting. It's a totally standard thing to write in Maths (or at least fix up whatever library everyone is using which is wrong).
If you want to discuss c#, then please update your example to be legal, and we can discuss waht it means.
But that was my point, for that to be legal, as it is in some other languages (as I've been told is the case, by someone who was actually desperately trying to disagree with me but ended up agreeing with me).
If you want to discuss math, then that's fine too. But we'll have to agree on what a particular piece of syntax means as different math systems do not agree on this.
Yeah, that was my point in regards to brackets to begin with. Except Texas Instruments all actual calculators will give the correct answer (and it's in the Texas Instruments manual why they don't), but when it comes to e-calculators it's the Wild West! As I said, it's the bane of my existence as a Maths teacher that all these e-calculators give the wrong answer (as both a programmer and a teacher, I find it embarrassing when programmers declare "you don't have to know Maths to be a programmer!" - yeah, well, look where THAT'S got us :-( ).
Thanks for the links. I'll see how I go (although I recall now I did reply directly to an MS Maths Solver tweet at the time, pointing out it didn't handle brackets correctly, and they just ignored me).
Similarly, you're welcome to think that the approach to rounding you teach your year-7 students is the only way to do things. But that's definitely just a you opinion. It's def not shared by a much broader and larger community of mathematicians and other experts in the domain of computer computation who disagree.
Similarly, you're welcome to think that the approach to rounding you teach your year-7 students is the only way to do things. But that's definitely just a you opinion. It's def not shared by a much broader and larger community of mathematicians and other experts in the domain of computer computation who disagree.
And again it's not a ME opinion, it's in Maths textbooks.
I'm NOT invoking a
You are. You specified the context as "Ok, so speaking of C# and the runtime"
In that context you are invoking 'a'. You can see that here:
Again, if you want to discuss not C#, you're welcome to. But you'd have to actually explain what rules your syntax follows that you are referring to.
But that was my point, for that to be legal, as it is in some other languages (as I've been told is the case, by someone who was actually desperately trying to disagree with me but ended up agreeing with me).
If you want this to be legal, please open a discussion over at github.com/dotnet/csharplang. It can be discussed there.
And again it's not a ME opinion, it's in Maths textbooks.
That's the opinion of you and the author of that textbook. As stated numerous times, and demonstrated in this thread, it is neither universal nor applicable. You keep thinking that the abstractions around how a particular subsection of math is taught to a year 7 student is applicable to a different domain like how rounding works in computer programs. It doesn't.
Imagine if someone said we make computers work like the math we teach to year-1 students. I get that your'd wedded to your year-7 textbooks. But in the real world with real numerical issues, which have to deal with finite precision computers, we need real solutions that address serious shortcomings in the simplistic approaches you teach your students.
Again, if you want to create a programming language for year-7 students you can use whatever semantics you want. But if you want a real language that is applicable to the needs of: bankers, staticians, graphics programmers, AI developers, etc. etc. etc. then sticking with year-7 math is not going to cut it.
--
And again it's not a ME opinion, it's in Maths textbooks.
As said:
It's def not shared by a much broader and larger community of mathematicians and other experts in the domain of computer computation who disagree.
you continuing to harp on your childrens textbook isn't changing the equation at all here (pun intended).
"no such thing as a square root of a negative number" - in University they tell you that was wrong and teach you about complex numbers.
Pinged my math teacher friend. They definitely do not teach that. They just say: it's something you won't know how to do yet, but will learn about later.
Ok, but I was definitely taught that (I can remember rejecting it as not possibly being correct at the time, and then didn't find out until University that in fact I was correct all along)..
My recollection was also learning this, well before university (and well before HS as well). Likely in the algebra-2 classes IIRC.
Well that's definitely not correct then
You're being circular with your definitions. You're only allowing for correctness to be how you do it. And then say that everyone agrees on this. But when people point out other places taht don't agree and do it differently, you just say they're not correct.
And I asked what happens about teaching expanding brackets, so what happens? Do you not teach expanding brackets? Because you can't have both teaching expanding brackets and NOT Distribute what is adjacent to brackets - expanding brackets doesn't work without it (nor The Distributive Law, nor factorising). If you can find a textbook that teachers expanding brackets, then I believe you'll find where it overrides that "brackets" only means within brackets - as I said, expanding brackets doesn't work without it.
otherwise how would you know what to do with a(b)? Or for that matter (a+b)(c+d)?
Treat it as a × (b)
and (a + b) × (c + d)
. Then apply the distribution law.
This is not directly related to the 8 ÷ 2 (1 + 3)
example though. I would still apply the distribution law. The ambiguity is not in the distribution law, it's in interpreting the expression either as (8 ÷ 2) × (1 + 3)
or 8 ÷ (2 × (1 + 3))
. In reality in school this ambiguity is not an issue because you write division as fraction:
$$\frac{8}{2}(1 + 3)$$
or
$$\frac{8}{2(1 + 3)}$$
We get taught the distribution law, the priorities, and the implicit multiplication. The ambiguity above is quirk that is not observed with the fractional notation and hence we never NEED to define it one way or another.
And we also don't need to define "term" pretty much until you start defining parse trees, syntax trees, which is a different subject.
And we also don't need to define "term" until much later, in terms of the existing principles.
"no such thing as a square root of a negative number" - in University they tell you that was wrong and teach you about complex numbers.
Nope. They tell us about the existence of real numbers much earlier. They also tell us that complex numbers exist without going deep into them. And this doesn't mean that what we were taught was wrong, it just restricts it to a specific domain which is implicitly understood in most context to be the default domain.
Similarly, in physics you are taught newtonian principles first and later you restrict it into certain domain only when you need to explain special relativity.
Treat it as
a × (b)
and(a + b) × (c + d)
. Then apply the distribution law.
That's just multiplication ("M") though, not The Distributive Law ("B", Brackets).
This is not directly related to the
8 ÷ 2 (1 + 3)
example though. I would still apply the distribution law. The ambiguity is not in the distribution law, it's in interpreting the expression either as(8 ÷ 2) × (1 + 3)
or8 ÷ (2 × (1 + 3))
.
And The Distributive Law means there's no ambiguity - a(b+c)=(ab+ac), so it's unambiguously the latter. In fact to be precise, if you're adding brackets, it's 8/(2)(1+3) - I discussed this in my thread just last week.
And we also don't need to define "term" until much later
Terms are defined, again, in Year 7 Maths textbooks.
I'm done. You all keep bringing up things I already covered in my thread - just go read my thread.
Maybe I can make this as clear as possible:
We are not creating a programming language for year-7 math students in your town.
We are creating a language and runtime for executing programs needed by developers and experts in many advanced domains. Such experts and systems need flexibility in areas like rounding. They also want a system that, by default, minimizes inaccuracy in complex systems.
The design of this system caters to them. They are the ones that pay us. They are the ones working on the projects and solutions that run the businesses and economies around the world. These audiences do not care or want things to work in the basic fashion they were taught as children. Instead, they need things to work this way to have things work as best as possible in these real world domains.
This is practical engineering, not idealized child's math.
Just as children learn basic approximations in certain topics, only to discover deep complexity later when going into the applied side of it, the same occurs with math and the applied side in computer engineering.
--
I'm not sure how much plainer we can state it. C#/.net is not an idealized toy system based on basic child's math rules. It's a practical computer engineering system used to solve the advanced problems of that domain.
just go read my thread.
Your thread is your opinion. I will take the opinions of the dozens of experts I found and the hundreds of papers that go deeply into this topic. And do so with a depth that no year -7 textbook even attempts to scratch the surface of.
Perhaps it is you that might want to go read up on things :-)
Year 7 Maths textbooks.
Which, again, has no bearing here (unless we were writing a different year-7 textbook).
.net needs to cover the math needed by much more advanced cases, going far beyond the primitive simplicity taught to children.
That's just multiplication ("M") though, not The Distributive Law ("B", Brackets).
"The Distributive Law says that multiplying a number by a group of numbers added together is the same as doing each multiplication separately."
I don't see any mention of "brackets" or "parentheses" in this definition. That's the definition we learn.
And The Distributive Law means there's no ambiguity - a(b+c)=(ab+ac)
I am not questioning the distributive law here. I'm question what is a
in the expression 8 ÷ 2 (1 + 3)
. Until you realize that's a different claim that doesn't question anything about distributive law then we won't make any progress.
Terms are defined, again, in Year 7 Maths textbooks.
And, once again, not every country teaches by the same textbooks. If you look at Algebraický výraz and the corresponding English version of the article - Algebraic expression - you may notice that they are structured very differently. While the underlying theory is identical the way it's expressed and taught is not, and that's why there are ambiguities.
@SmartmanApps you are confusing the rules on how the math works wrt underlying theory as making requirements on syntax and how the Syntax must be structured. Not only are these mostly unrelated topics, they are also things that have changed wildly over time.
Math Syntax itself is something without universal agreement, and it's something that has changed over the decades and centuries.
Your particular system teaches one particular Syntax. But that Syntax is neither correct nor incorrect. It's a decision on how to effectively express mathematical ideas. Ideas like the distributive law hold regardless of syntax.
You are also then erroneously extrapolating out that because you and your school system have a preference for a particular syntax, that programming languages adopt the same thing.
However, programming languages are not bound to the syntax decisions of your domain, no more than we are bound by the Syntax decisions of English. Instead, we pick the Syntax we feel is best for programers to express these concepts, esp considering the knowledge that they are manipulating computers to do that work. It's syntax design in the domain of computer engineering.
-
Note, this is also why we don't necessarily use the syntax used by logicians, or staticians, or actuaries, or theoretical physicists. Different groups prefer different Syntax optimized for their own domains.
"The Distributive Law says that multiplying a number by a group of numbers added together is the same as doing each multiplication separately."
I don't see any mention of "brackets" or "parentheses" in this definition. That's the definition we learn.
No, that's the Distributive Property. The Distributive Law applies to bracketed terms. It's the reverse of factorising - again, I talked about this in my thread, just read my thread.
I am not questioning the distributive law here. I'm question what is
a
in the expression8 ÷ 2 (1 + 3)
.
2! a(b+c)=2(1+3)=(2+6)=8, NOW, having solved Brackets, you can do the Division, 8/8=1.
And, once again, not every country teaches by the same textbooks. If you look at [Algebraický výraz]
Isn't that the one you already quoted from before, which is "elementary" school? I asked you to find a textbook which covers expanding brackets (high school, or whatever you call it there), as I'm sure you'll find it overrides it.
Your thread is your opinion.
Nope, it's statements about what's taught in Maths textbooks (plus some history, like Lennes).
Perhaps it is you that might want to go read up on things :-)
I did, I'm a Maths teacher - if you read my thread you'll find references to the things I've read. :-)
Math Syntax itself is something without universal agreement, and it's something that has changed over the decades and centuries.
Order of operations hasn't changed in at least 400 years - again, it's in my thread. Hint: read the part about Cajori (1928).
as I'm sure you'll find it overrides it.
This is exactly what I've found when researching your claims. Tons of literature explaining rounding systems and their applicability in numerical systems. The year-7 way you teach appears to be entirely overridden by literal decades and centuries on this topic.
Year 7 math is not the right abstraction for computer numerical systems by your own argument.
I am not questioning the distributive law here. I'm question what is
a
in the expression8 ÷ 2 (1 + 3)
.2! a(b+c)=2(1+3)=(2+6)=8, NOW, having solved Brackets, you can do the Division, 8/8=1.
Every single examinatory body here would say your answer is wrong since the order of operation says that a
is 8 ÷ 2
due to left to right evaluation, that's the ambiguity mentioned before.
- if you read my thread you'll find references to the things I've read. :-)
I did. None of them cover this topic.
I am not questioning the distributive law here. I'm question what is
a
in the expression8 ÷ 2 (1 + 3)
.2! a(b+c)=2(1+3)=(2+6)=8, NOW, having solved Brackets, you can do the Division, 8/8=1.
Every single examinatory body here would say your answer is wrong since the order of operation says that
a
is8 ÷ 2
due to left to right evaluation, that's the ambiguity mentioned before.
Nope, by the definition of Terms (which I remember already telling someone to read up about) the division means 8 is a single Term, followed by the single term 2(1+3), that IS going left to right. That is how it's taught, that is how it's marked. The references for it are in my thread.
That is how it's taught, that is how it's marked
By you.
The point here is that there isn't universal consensus. That has literally been pointed out by many people. You stating that they are wrong and you are right doesn't change that. Those people can state the exact same thing about you.
The references for it are in my thread.
I do not see a single reference that demonstrates an authoritative correct position. I see references to positions made and arguments as to why to do things a particular way. None of these make this option any sort of mathematical truth. It's simply a syntactic convention you and that group share agreement on.
If you go elsewhere you will see different groups with a different opinion on this. Yours is no more the right way versus theirs. Both are just different approaches with varying pros/cons.
In the context here though, it's not relevant. Netheir c# nor .net use this Syntax. We have our own chosen syntax for numeric manipulation.
Nope, by the definition of Terms (which I remember already telling someone to read up about) the division means 8 is a single Term, followed by the single term 2(1+3), that's IS going left to right. That is how it's taught, that is how it's marked. The references for it are in my thread.
This hinges on "multiplication by juxtaposition" having higher precedence than division. That's not universally taught/assumed. It's not a thing in any major computer language I'm aware of, where you always have to specify the multiplication symbol (And so the equation becomes the commonly transformed8 ÷ 2 * (1 + 3)
).
And The Distributive Law means there's no ambiguity - a(b+c)=(ab+ac)
That might be true in mathematics, but it's not always true in programming. There's large ranges of values (in all programming languages) where, due to the practical constraints of the system, the two will yield vastly different results.
That is how it's taught, that is how it's marked
By you.
By Maths teachers. I'm a Maths tutor as well, which means I know how other Maths teachers have marked it too (just recently tutored a U.K. student who had to know how to do it - she passed after having failed 6 times previously).
It's simply a syntactic convention you and that group share agreement on
And that group is Maths teachers.
The point here is that there isn't universal consensus.
Not amongst people who aren't Maths teachers, no, but it's still taught unambiguously by Maths teachers in the first place.
Isn't that the one you already quoted from before, which is "elementary" school?
No, this is Wikipedia. Notice how the English version defines the what "term" is, while the Czech one does not. We don't try to teach a specific formal syntax, we teach the concepts and how to write them unambiguously.
(I can see you didn't even bother clicking through the links we posted, but whatever...)
Cyrus rightfully pointed out that you seem to treat mathematical laws and syntax somewhat interchangeably. As a computer programmer I understand that desire to have a precisely defined syntax but that's just not the case in math. These odd cases could be treated as a "syntax error" or a precedence to one of the solutions. Your textbook may lean one way, other articles and textbooks can lean the other way. Even if your definition was somehow codified by some standards body, it doesn't make it a universal standard. In this case the standard is how people understand the expression and that clearly varies, and varies with education system and with time. In our education system we teach the people to avoid these ambiguities because there is a very real risk of confusion.
By Maths teachers
And i have talked to other math teachers who disagree with you. So appeals to your authority here are not relevant.
And that group is Maths teachers.
Clearly not, as demonstrated numerous times in the thread. Note that when this was demonstrated, you simply stated that they are wrong. But absent any authority on the topic, their view that you are wrong is just as equally valid.
Not amongst people who aren't Maths teachers
Yes, among those people.
but it's still taught unambiguously by Maths teachers in the first place.
Literally not according to multiple math teachers i've now checked with. So what am i to do. Multiple math teachers disagree with you. You insist you are right. Oh well. Since you haven't linked to anything that demonstrates this is universal, and i've seen numerous examples showing it isn't, i have no choice but to assume you are incorrect.
This hinges on "multiplication by juxtaposition" having higher precedence than division.
No, it hinges on solving Brackets having higher precedence than Division, which it does, universally. Again, Distribution isn't "Multiplication", there's no multiplication symbol. Solve Brackets, then Division. I discussed this in my thread.
That's not universally taught/assumed.
The Distributive Law and Terms are taught in every Year 7-8 Maths textbook I've ever seen, as well as expanding adjacent brackets after that.
It's not a thing in any major computer language I'm aware of,
I did have someone tell me he found some languages that did support it, but I don't remember what they were.
And so the equation becomes the commonly transformed
8 ÷ 2 * (1 + 3)
.
Yeah, but that's wrong - I discussed this last week. The correct way to add brackets, if you want to insist on it, is 8/(2)(1+2), otherwise you just turned 2 terms into 3 terms, and changed the answer. 8/(2*(1+3)) would also be valid, but not really the correct way.
That might be true in mathematics, but it's not always true in programming.
No, as I said before, programmers not obeying the rules of Maths is the bane of my existence as a Maths teacher. (sigh)
Even if your definition was somehow codified by some standards body, it doesn't make it a universal standard.
And even if it were a universal standard, it would be a universal standard in the domain of teaching math. That is not our domain. We are not a pedagogical language. We are a language for computer engineering, allowing programmers to manipulate numeric approximations. Whatever standard you fictitiously assume exists for math has no bearing in our domain.
I don't know how many more times this need to be stated. We are not pure math. We are not trying to be pure math. We have never claimed to be pure math. Our customers do not pay us to produce pure math.
Secondly, our syntax is not governed by the whims of your particular group of year-7 teachers taht like a particular syntax. No more than we are governed by university math teachers, or math teachers of any stripes. We are also not governed by the whims of logicians, and the syntax they use. Full stop.
The Distributive Law and Terms are taught in every Year 7-8 Maths textbook I've ever seen, as well as expanding adjacent brackets after that.
Here's one you didn't see then: https://www.kartable.fr/ressources/mathematiques/cours/calculs-numeriques/2711
Isn't that the one you already quoted from before, which is "elementary" school?
No, this is Wikipedia. Notice how the English version defines the what "term" is, while the Czech one does not. We don't try to teach a specific formal syntax, we teach the concepts and how to write them unambiguously.
(I can see you didn't even bother clicking through the links we posted, but whatever...)
No, I did click, expecting to see a textbook, but was greeted with a Wikipedia page, so I was confused.
which it does, universally.
Literally not universally. As has been pointed out by several people in the thread, and talking to actual math teachers i know. I don't even know if you're a math teacher. At least with them, i know them and can verify this side of things. You keep rejecting them as simply being wrong. But then your definition is "it's universal if i only look at people i agree with".
I did have someone tell me he found some languages that did support it, but I don't remember what they were.
Again, and i mentioned this before, not in any general purpose programming language. There are specialized programming languages for this purpose. Specifically those that exist for pedagogical purposes, or which are willing to sacrifice in other domains to try to excel in being closer to 'pure math'. C# and .net are not those systems. We do not claim to be. We do not promise to be. We do not pretend to be.
If you want a specialized math system use it. We are a computer engineering tool for doing operations on numeric approximations, using industry standard agreed upon methods that produce the results our industries want, with far better results than that used by year-7 textbooks.
Literally not according to multiple math teachers i've now checked with. So what am i to do
Easy, ask them for textbook references to support their statement. I'll wait.
is the bane of my existence as a Maths teacher. (sigh)
That's your problem then. I'm sure logicians get upset for some reason. Or english professors. Or physicists. That's not our problem.
No, as I said before, programmers not obeying the rules of Maths
We do follow the rules of math. Just rules that are far more sophisticated and relevant than the math taught to year-7 students. I'm not sure how to get this point across: The math you are teaching them is fine for that age, but is deficient for the needs of our ecosystems.
Looking at year-7 textbooks i can see this across the board. They don't even try to understand or express the limitations in the ways this is taught to that age. And why would they? Math students aren't engineers. They're not faced with teh real world problems that these approximations cause. They just need something relatively simple that htey can understand to pass tests. That's wholly insufficient for the domain of computer engineering.
As a teacher, if you want to be good at your job here, you should not blindly adhere to limited math taught to year-7 students. You should attempt to understand these domains and introduce your students to the interesting complexity in them. That's what my teachers did, and it's why i majored in topics like mathematics.
Easy, ask them for textbook references to support their statement. I'll wait.
They've asked for the same from you. Specifically anything showing universality on this. Or any sort of proof that shows universality here that proceeds not just at this level, but all the way up the mathematics ecosystem.
Currently, it's two-to-one, along with all the references provided here. I don't put any special stock in a particular math textbook you happen to use over any other sources, especially when making claims of universality.
Easy, ask them for textbook references to support their statement. I'll wait.
Not to be picky, but we are still waiting for your textbook references. You keep juggling the words "every textbook" but didn't name a single one.
We do follow the rules of math
Windows calculator, Excel, and MS Maths Solver all DISOBEY the rules of Terms and The Distributive Law (in Windows calculator one of the numbers just literally disappears!). Try again.
he keeps just referencing a thread of his on dotnet.social, which is self referential, but occasionally has pictures of the book he teaches from. :-/
i see no rigorous examination of things. I see no effort spent to actually demonstrate universality of claims. Conversely, i see tons of information showing this is not universal.
Easy, ask them for textbook references to support their statement. I'll wait.
Not to be picky, but we are still waiting for your textbook references. You keep juggling the words "every textbook" but didn't name a single one.
And I've said repeatedly go look in my thread - all in there. As far as I can tell not a single person has looked at it.
We do follow the rules of math
Windows calculator, Excel, and MS Maths Solver
We are none of those things. We are not the windows calculator. We are not excel. And we are not the MS math solver. You also cut out my context where i said specifically:
We do follow the rules of math. Just rules that are far more sophisticated and relevant than the math taught to year-7 students.
Please stop asking us to move to basic, simplistic, problematic approaches just because you find them simple to teach your students. They are not appropriate for real world domains, and you do yourself (and your students) a disservice by not learning enough to understand their motivations and mechanisms, as that would be extremely valuable to incorporate into your lessons.
My best teachers did this. They did not blindly teach from a book, insisting that the single way a textbook did it was the uniform truth. They helped me understand the beauty and structure behind the math, as well as the real world applicability of it, and how to mesh the needs of abstract pure systems (like math theory) with real world practical concerns. It was from these teachers that i developed my deep love of theory and practice, and it's a major reason i work i both majored in these topics and now work in these systesm. I see none of that in the arguments you've presented. Only a seeming insistence on blind adherence to your textbook.
And I've said repeatedly go look in my thread - all in there.
As i said, he jsut references his self referential thread. No actual willingness to point to anything except him insisting that he is correct.
As counter evidence to you, i point to this thread. Which now shows you are wrong. See how easy that is? :)
Easy, ask them for textbook references to support their statement. I'll wait.
They've asked for the same from you.
Refer them to my thread, then ask them again after they've read it.
As counter evidence to you, i point to this thread. Which now shows you are wrong. See how easy that is? :)
This thread contains no textbook references - see how easy it was to debunk that?
This thread contains no textbook references - see how easy it was to debunk that?
I reject your claim that only textbook references matter. See how easy that was. You don't get to state something is true about how math works in the practical domain of computer engineering, and then reject anything but year-7 textbooks. That's not how things work. There is an enormous wealth of research, and published papers on these topics, dealing with the practical real world concerns involved here. These are made by experts in the domains intersecting this topic. AFAICT, you've put forth no credentials showing you have any familiarity with this at atll beyond just teaching year-7 math. I have no reason to think that your experience there in any way gives you any sort of expertise to discuss this topic in the first place :-/
Description
As title says Math.Round fails to round 0.50 values be it decimal or double data typed, it rounds these values but returns lower values rather than it should add value 1.
For Ex. if I have to round 99.50 and put Math.Round around it then it will return 99 whereas it should return 100.
Reason: in Excel and in SQL server too its returned 100.
Reproduction Steps
Math.Round(99.50M, 0) // 100 is expected. Math.Round(99.49M, 0) // 99 is expected and is Okey. Math.Round(99.51M, 0) // 10 is expected and is Okey.
Expected behavior
Math.Round(99.50M, 0) // 100 is expected.
Actual behavior
Math.Round(99.50M, 0) // 99 is return
Regression?
No response
Known Workarounds
having to write logic for exact 0.50 values while rounding values
Configuration
VS22 Community version along side .Net7, on Win11
Other information
No response