SIGN UP FOR THE RECESS WAITLIST HERE!!! recess.gg/mattbatwings And join the Redstone at Recess discord!! discord.gg/X9CXVAqZAG Questions? Ask in reply to this message, or ask in the discord!
I'm a mechatronics engineer and a senior software developer. I have to say that I'm amazed with all your dedication and creativity, mixing all the things I love in your videos. Keep it up man!
Now for the Ultimate Challenge: Add Sqrt, Exponents Add Functions like sin, cos and tan Add Imaginary Numbers (-> Square Root of negative Numbers puts imaginary number) Add a nice Display to show Exponents, like graphically how you would write it, with the exponent on top of the Number. Good Luck! :) (Your work is absolutely amazing and I really appreciate it! I know some of these Ideas are very hard to impossible to build. Hopefully you always stay such a great RUclipsr and Redstoner! :D)
What you could also do if you wanted to have a history of old inputs is have the display be multi-rowed, but only the bottom row gets input to by the controls. Then, whenever you hit enter, it just passes the line to the row above it with some sort of 2D shift register, one for shifting the characters to the left, another for shifting everything up, making it look like a real multi-line calculator
Man, I got excited for complex exponentials, but still, amazing build. I once had a programming assignment to convert expressions to postfix notation, and now I finally know why that's useful, so that's cool.
I feel like I just got clickbaited. There was a freaking exponential in the thumbnail. Not only that it was represented as a superscript rather than just ^. Imagine how cool that would be in redstone
Yeah you may be right, but when was the last time you made something on the skill of what Matt makes? If it’s fairly recent, then why not just make it yourself instead of complaining about a RUclips video showcasing something cool?
It's amazing that this calculator is more competent than many old plastic desk calculators were. Having the full expression on screen at once is cool. Even old HP calculators just expect the user to learn postfix notation (though they make up for that by having a ton of functionality)
i’m currently studying algorithms using c++, and you just taught me two algorithms in a video, about the postfix thing, thank you and i think coding in redstone has probably the same difficulty as assembly, it’s a fantastic work and i appreciate it!
You’ve inspired me to learn so much more about computing and helped motivate me to major in computer engineering & programming!! You’re great keep up the amazing work!!
lol fuck I missed the thumbnail mistake now it’s already fixed It said e*i^pi + 1 = 0 What’s correct and now there is e^i*pi + 1 = 0. The i was the same size as the e, when it should instead be same size as the pi
On the minus sign topic. You say you use a binary minus and an unary minus but from my knowledge it should be possible to only use the unary to negate the next token and then add the previous instead of differentiating between the operations. In the end substraction is only adition by a negative number
Ah true, didn't think of that! Hardware wise I think it would end up being about the same - essentially the negator would be moved from evaluation to tokenization
@@mattbatwings I'm glad you at least didn't do what my real graphing calculator does and make the user type in a different button for unary and binary subtraction
@@mattbatwingsHey, I want to clarify, in the video you said, if minus stands after digit, it's binary, if after parenthesis, it's unary. But, what if we type a negative number first, something like -4+7?
@@CheeseFilms that's still unary, an easy way to think of it is while binary "-" indicates that you are subtracting two numbers, unary just indicates that we are taking the negative of a number, which is what the - in "-4" is doing its saying that the number "4" is negative, same thing when the minus comes after a parenthesis
17:25 your calculator displayed 1609.856 - 125 = 1484.855 You can see it losing decimal precision. I would suggest using BCD (binary-coded decimal) arithmetic for your next version. It has a smaller precision loss compared to simple binary. And it’s also what almost all modern calculators use anyway. For example, 1/5 is “0.2”. In binary, it’s 0.001100110011… which will become smaller if you ever have to store it up to some finite place. But in BCD it’s just [0000].[0010] which is already finite just like regular decimal.
Woah, this is wild!! I'm actually so impressed. I'm wrapping up my undergrad electrical engineering degree this year, and it's so cool to see all this stuff I've learned in my classes used in a project like this. The fact that I mostly understood it really gives me confidence. Thanks for putting so much effort into these videos!
You know, it would've been easier just to make number after a minus straight up negative (two's complement if you will) then just using regular addition. I also really liked the base 2 multiplication trick of just separating a multiplication into powers of two, then bit shifting, and finally adding back together, would've been cool to see a two way system for both multiplication and division, since all that's necessary for the entire calculator be this + two adders.
This trick predates binary computers and even binary positional notation itself by _thousands of years,_ actually being considered easier than multiplying decimal numbers even for humans. It's often call "Russian Peasant Multiplication", though it seems to have existed even in ancient Egypt. Yes; people were doing binary long multiplication before they were doing _binary._
This is damn cool. I've seen some other really incredible redstone calculator showcases (namely your very own incredible graphing calculator), but I like how this one distills the complex problem of evaluating an expression into it's fundamental steps, then concisely explains how to solve each of those steps from a redstone/ CS perspective and brings it all together in a complete package. I really feel like I understand what I am looking at with this build and it doesn't just seem like an impressive mess of wires.
Just want to point out, at 8:20, There are a bajillion different versions of what you call PEMDAS. Here are some I've heard: - P arentheses - E xponents - M ultiplication & D ivision - A ddition & S ubtraction (This is the one I learnt) - B rackets - E xponents - D ivision & M ultiplication - A ddition & S ubtraction - B rackets - O rders - D ivision & M ultiplication - A ddition & S ubtraction (just found this one while looking up what the O is in BODMAS) - B rackets - I ndices - D ivision & M ultiplication - A ddition & S ubtraction
@@friesofthefrench Interesting. I think it does make more sense to have multiplication/division and subtraction/addition have only 2 letters, as this is how they work in practice.
You have blown me away once again with your amazing Redstone skills! I'm only able to explain what these individual blocks do, but people like you take the blocks and make them more than the sum of their parts. My hat goes off to you, sir.
I love seeing new vids of yours. I am not that great at math, I can barely make anything with redstone, but I do love Minecraft and learning. Wholesome, informative, and entertaining content as always ❤
I've been making calculators and other architectural stuff in redstone for years. yet, this is hands down the most invested I have been watching a technical redstone video yet xD
that's some great progress! it feels better than any other redstone calculator ever. your breakthrough, i can sense that others might build complex calculator with just redstone too. there's just 1 unrelated problem i see: point digits precision. currently, this can display up to 3 digits of fraction, then it's gone. like "0.142". it's not a problem if you didn't want more precision and didn't want to see what the next digit of places is. here's the example where it outputs the same value. 1/999=" 0.001", 1/1000="0.001". and then after 1000 it either just goes to 0. but for how much it took, i can't complain too much...
HP calculators and their descendants famously still allow the use of RPN. It doesn’t just save processing power; it can also be way faster and less error-prone to use, since you never have to type parens and the intermediate steps you’re doing are right there on the stack.
I think a history display of recent equations and results would be cool and relatively easy. The most important thing for doing more advanced math would be variables and an "answer" button like a TI84. The answer token lets you use the result of the last equation in the middle of a new one, allowing for stuff like "1/Ans".
8:33 Fun fact: literally anywhere in academia above high school, the PEMDAS order is slightly modified. For example, the notorious 6/2(1+2) has two *CORRECT* answers depending on which version of PEMDAS you follow. The first one, taught in high school and shown in this video would give you this: 6/2(1+2) = 6/2(3) = 3(3) = 9. The second one treats parentheses a little differently. If they're directly next to a number (or variable), that multiplication takes priority, which would give you this: 6/2(1+2) = 6/2(3) = 6/6 = 1. This difference comes from the origin of the division symbol (the 2 dots and a line in the middle). It's actually a fraction with dots replacing the numerator and denominator. If you were to write it down, 6/2(1+3) would be 6 in the numerator position and the rest would go below in the denominator position. If you want to end a fraction in any scientific calculator, you need to add an operator or a space to tell it that the fraction is done. If you wanted to get 9 no matter what PEMDAS you use, you'd have to write it as 6/2*(1+2), 6/2 (1+2), or even better 6/2 * (1+2). And if you really want to avoid any confusion, spam the parentheses: (6/2)(1+2) to get 9 and 6/(2(1+2)) to get 1.
From what it looked like, it didn't seem like this calculator implements implied multiplication, so this matter wouldn't really come up. Most programming languages don't support implied multiplication either, though it's actually possible to argue that implied multiplication acts more like a function call than an arithmetic operator, and function calls do generally bind more strongly than arithmetic operators.
Hello, I am a guy who really loves your videos and I have an idea for you. You don't have to make it if you don't want to but you can. You should make a calculator that can talk to you or do simple tasks for you. I think it is a really cool idea but it would be very difficult to make and isn't really logical redstone.
next step: variables, and extending the calculator so it can use those and not only numbers then: functions, strings, and other types like boolean, none, and then lists. variable scope can become non trivial if you allow nested function or closures (function that are returned by another and still need to acces their parent function scope) the call stack can be a pain with closures. if you're adding classes, or modules or namespaces, the dot operator becomes necessary too. I'm working on a language of my own, that's pretty cool to see you make one in minecraft You might wanna share your language in the ProgrammingLanguages subreddit, i'm sure they'd be thrilled to learn about it
I consider Shunting Yard one of the most important and useful algorithms in computer science, and I love how elegant it is. I've implemented it in software several times, typically when I'm creating custom programming languages for fun, but I don't think I've ever considered building redstone hardware to do it 😂 Well done! And now that you're an expert at building tokenizers... your next step is to build a full compiler for a redstone-based programming language 😁
Stack-based languages often use pre/postfix for arithmetic, but you can have pre/postfix arithmetic outside of stack-based langauages, e.g. the Lisp family. There's also non-esoteric stack-based languages such as Forth.
I understand people need bread, but like 40 bucks for a beginners course sounds a bit expensive ngl. most people probably couldn't fork out that much money per week honestly
also you'd need to consider that the demographic of the course would most likely be teenagers to young adults which means they'd probably have little to no money to go to this
@BoredEditor4k iirc they said 40$ a week. my family is upper middle class and would say no rather instantly, don't know how you would comfortably pay for that. if it was 40$ a month, then I wouldn't have commented anything
I understand that a lot of effot anstuff goes to these recess but 20$/week is a lot, that's like 100zł, there is no way i coud ever possibly afford that
while you have only digits and the 4 basique operations, you know that every result will be in Q (set of fraction) so you can store any number with 1 int and one signed int and then when display is needed, display the result with a decimal approximation
well considering the fact that 32767 is the highest 14 bit binary number, and 9 is the largest decimal number, and it is in the decimal place, I think it's safe to say the calculator is trying to output infinity but doesn't have enough space to. would've be funny if matt added the tnt from his old calculator
@@thevalarauka101 I looked through the world download and the output seemed to be 32 bit input and 32 bit output with the carry ignored, but if the highest number is 32767, it means the highest number is 14 1s, which would be a 15 bit signed integer, if it's got 3 decimal places it probably can't exceed 12 bits past the decimal point, so not sure what the other bits are doing, maybe you're right and it's just 16 bits and 16 decimal
@@manidhingra5192 16 bits decimal would give a minimum value of 1/65536, which is about 0.000015; even having 4 decimal places would appear fairly imprecise in places, so it kind of makes sense to show just 3
This is pretty great! I hope you, or someone, makes one with variables. Something like a simplified version of a Ti-84, maybe. Also, if you want mathematical accuracy, it might be good to keep track of ratios of whole numbers instead of using fixed or floating point, and... There's likely a way to handle irrational numbers as accurately as necessary for any given level of precision you design for as well, but I don't know how.
Okay, now make every function from windows calculator: dms, deg, floor, round, ceil, sin, cos, tan, cot, sec, csc, inverse trigs, hyperbolic trigs, all trigs but in radians, grads, mod, Gamma function (hidden under ! button), sqrt, exp, … Edited: Ultimate challenge: make Wolphram Alpha.
What?! You have make a math expr interpreter in Minecraft, when I was still struggle to figure out how to build one in C, but this video help me a lot!
Funny, where I'm from, we call PEMDAS "BODMAS" It means the same thing but it stands for "brackets, ordinals, division, multiplication, addition, subtraction"
Very cool video as always! "postfix" notation is also sometimes called "reverse polish notation"(and some scientific calculators use it or can use it directly). All these parsers in Minecraft redstone projects lately got me thinking... How long until the first Minecraft CPU has it's own redstone-based assembler/compiler?
I think someone has nearly done this a long time ago but I don’t remember who. (Except the assembler weren’t in game, it was an external program which created a schematic for the ROM that gets pasted in to the world)
@@samuelhulme8347 Yes, people have built Minecraft CPUs with external assemblers/compilers - I'm actually nearly complete on mine. But I really want to see an *in-game* assembler/compiler, with no external tools needed! I wouldn't even mind if it uses command blocks, and more complicated parsers have been built in Minecraft before(e.g. SethBlings BASIC interpreter including lexer/parser/interpreter), although a "survival-friendly" version definitely could be build and would be cool!
I go to college for electrical and computer engineering. This and the programable computer video taught me more in an hour or so than two professors could in an entire year. what the shit.
1/0 should give you an infinite number (function 1/x decreases on the range (0; +inf)). But this calculator doesn't have inf, so it just returns the maximum number it can handle
SIGN UP FOR THE RECESS WAITLIST HERE!!!
recess.gg/mattbatwings
And join the Redstone at Recess discord!! discord.gg/X9CXVAqZAG
Questions? Ask in reply to this message, or ask in the discord!
Could you maybe make a video that shows you building something, but the whole process and not necessarily with commentary.
Maybe you could make a second channel with the entire building process
How does postfix know if 123+ means 12 + 3 or 1 + 23?
What happens in cases of singularities?
the thing is, people all dont have access to money, is it free?
GUYS THE VIDEO ISNT SPONSORED BY BRILLIANT
we fr got a mattbatwings video not sponsored by brilliant before gta 6
Extra likes for the man he loves us
HOW
Oh my gosh! 🤯
🤯
I'm a mechatronics engineer and a senior software developer. I have to say that I'm amazed with all your dedication and creativity, mixing all the things I love in your videos. Keep it up man!
Blue comment on youtube?
Now for the Ultimate Challenge:
Add Sqrt, Exponents
Add Functions like sin, cos and tan
Add Imaginary Numbers (-> Square Root of negative Numbers puts imaginary number)
Add a nice Display to show Exponents, like graphically how you would write it, with the exponent on top of the Number.
Good Luck! :)
(Your work is absolutely amazing and I really appreciate it! I know some of these Ideas are very hard to impossible to build. Hopefully you always stay such a great RUclipsr and Redstoner! :D)
I guess that what you described is Turing Complete. We just have to wait for the end of let's build a Redstone computer.(Oh my god 36 minutes ago)
It should also include constants like pi and e
@@srengp3805 Yes, in addition that would be cool too
@@elen1ap Turing complete requires way less than that, theoretically a ALU, Conditional Branches and Registers already is Turing Complete
I don't know if this already has it, but protection against invalid equations would be cool, as well as a backspace button.
What you could also do if you wanted to have a history of old inputs is have the display be multi-rowed, but only the bottom row gets input to by the controls. Then, whenever you hit enter, it just passes the line to the row above it with some sort of 2D shift register, one for shifting the characters to the left, another for shifting everything up, making it look like a real multi-line calculator
this would be really cool!
Man, I got excited for complex exponentials, but still, amazing build. I once had a programming assignment to convert expressions to postfix notation, and now I finally know why that's useful, so that's cool.
I feel like I just got clickbaited. There was a freaking exponential in the thumbnail. Not only that it was represented as a superscript rather than just ^. Imagine how cool that would be in redstone
its just trig, the exponent is i
yeah this is genuinely lame, postfix notation is first year uni stuff, shit thumbnail
You can write a program yourself that handles user input and rendering and all the calculations and run it on any redstone computer
I was pretty disappointed with this, too. The end result was still impressive, but I feel lied to.
Yeah you may be right, but when was the last time you made something on the skill of what Matt makes? If it’s fairly recent, then why not just make it yourself instead of complaining about a RUclips video showcasing something cool?
It's amazing that this calculator is more competent than many old plastic desk calculators were. Having the full expression on screen at once is cool.
Even old HP calculators just expect the user to learn postfix notation (though they make up for that by having a ton of functionality)
i’m currently studying algorithms using c++, and you just taught me two algorithms in a video, about the postfix thing, thank you and i think coding in redstone has probably the same difficulty as assembly, it’s a fantastic work and i appreciate it!
part 2 idea!: ADD SIN, COS, TAN, ^ , and if possible, variables and also add pi and e etc
nooo not sin cos tan 😢
@@0kr4m more like df(x)/dx 😁
sin cos and tan would be WAY too hard ngl, vars should be easy tho
even better, he should add the constants e, i and pi with exponentiation so that the thumbnail isn't clickbait
@@Activation123I mean, it shouldn't be hard, it is just division
You’ve inspired me to learn so much more about computing and helped motivate me to major in computer engineering & programming!! You’re great keep up the amazing work!!
❤️
Part 2: Scientific calculator in Minecraft
He already did a graphic one
_part 3: _*_gameboi w/ calculator i n c l u d e d_*
lol fuck I missed the thumbnail mistake now it’s already fixed
It said e*i^pi + 1 = 0
What’s correct and now there is e^i*pi + 1 = 0. The i was the same size as the e, when it should instead be same size as the pi
**technically**, it's e^(i*π) 🤓
hmm yes i love e^(iπ²/2+1)+1
This is, literally, the first time I've ever heard of writing math in postfix notation. That whole part of the video blew my mind...
The output cleaning part sounds a lot like significant figures
you would be correct
Hi foxy
@@wueffiYT hi waflle
@@wueffiYT hi waffle
On the minus sign topic. You say you use a binary minus and an unary minus but from my knowledge it should be possible to only use the unary to negate the next token and then add the previous instead of differentiating between the operations. In the end substraction is only adition by a negative number
Ah true, didn't think of that! Hardware wise I think it would end up being about the same - essentially the negator would be moved from evaluation to tokenization
@@mattbatwings I'm glad you at least didn't do what my real graphing calculator does and make the user type in a different button for unary and binary subtraction
@@mattbatwingsHey, I want to clarify, in the video you said, if minus stands after digit, it's binary, if after parenthesis, it's unary. But, what if we type a negative number first, something like -4+7?
@@CheeseFilms that's still unary, an easy way to think of it is while binary "-" indicates that you are subtracting two numbers, unary just indicates that we are taking the negative of a number, which is what the - in "-4" is doing its saying that the number "4" is negative, same thing when the minus comes after a parenthesis
@@danyboumoujahed5004 yeah, thanks, but does he implemented it? In the video he tested just these 2, and I want to know if it is working
17:25 your calculator displayed
1609.856 - 125 = 1484.855
You can see it losing decimal precision.
I would suggest using BCD (binary-coded decimal) arithmetic for your next version. It has a smaller precision loss compared to simple binary.
And it’s also what almost all modern calculators use anyway.
For example, 1/5 is “0.2”.
In binary, it’s 0.001100110011… which will become smaller if you ever have to store it up to some finite place.
But in BCD it’s just [0000].[0010] which is already finite just like regular decimal.
well, it's only storing 16 bits, so that will happen; it might also not be 100% accurate due to the way everything is implemented
9:05 okay, can we just talk about how the first thing in his search suggestions is "how to vote"?
I thought I saw that. I wasn't sure I saw it right.
Insanely cool step up for redstone calculators, and a redstone school is such a great idea. Banger video
Woah, this is wild!! I'm actually so impressed. I'm wrapping up my undergrad electrical engineering degree this year, and it's so cool to see all this stuff I've learned in my classes used in a project like this. The fact that I mostly understood it really gives me confidence. Thanks for putting so much effort into these videos!
You know, it would've been easier just to make number after a minus straight up negative (two's complement if you will) then just using regular addition. I also really liked the base 2 multiplication trick of just separating a multiplication into powers of two, then bit shifting, and finally adding back together, would've been cool to see a two way system for both multiplication and division, since all that's necessary for the entire calculator be this + two adders.
This trick predates binary computers and even binary positional notation itself by _thousands of years,_ actually being considered easier than multiplying decimal numbers even for humans. It's often call "Russian Peasant Multiplication", though it seems to have existed even in ancient Egypt.
Yes; people were doing binary long multiplication before they were doing _binary._
The way the number moves from right to left at 17:19 is so satisfying.
Matt : "and i think the calculator is finished!"
Me : What's 9+10?
the calculator : 21
Yeah it answers in base 10.
computation: base 12, answer: base 10
This is damn cool. I've seen some other really incredible redstone calculator showcases (namely your very own incredible graphing calculator), but I like how this one distills the complex problem of evaluating an expression into it's fundamental steps, then concisely explains how to solve each of those steps from a redstone/ CS perspective and brings it all together in a complete package. I really feel like I understand what I am looking at with this build and it doesn't just seem like an impressive mess of wires.
Implementing algorithms with redstone is so impressive to me. Incredible work as always! I love the teaching resources you're creating too.
Just want to point out, at 8:20, There are a bajillion different versions of what you call PEMDAS.
Here are some I've heard:
- P arentheses
- E xponents
- M ultiplication &
D ivision
- A ddition &
S ubtraction
(This is the one I learnt)
- B rackets
- E xponents
- D ivision &
M ultiplication
- A ddition &
S ubtraction
- B rackets
- O rders
- D ivision &
M ultiplication
- A ddition &
S ubtraction
(just found this one while looking up what the O is in BODMAS)
- B rackets
- I ndices
- D ivision &
M ultiplication
- A ddition &
S ubtraction
I learned gems
G- groupings
E- exponential
M-Multiplication/division
S-Subtraction/addition
@@friesofthefrench Interesting.
I think it does make more sense to have multiplication/division and subtraction/addition have only 2 letters, as this is how they work in practice.
How does this calculator handle dividing by zero?
@@sethklaassen2532 definitely with TNTs 🤣💥
2:0=... We found a problem with your computer, Shutting down
It implodes
Inf
it probably just outputs all ones
very nice explanation on tokenization/ lexing
Insane project, beautifully explained in a way I could follow along every step!
You have blown me away once again with your amazing Redstone skills! I'm only able to explain what these individual blocks do, but people like you take the blocks and make them more than the sum of their parts. My hat goes off to you, sir.
i long for the day where someone makes a redstone computer powerful enough to run a real world operating system
Oh snap man! This is like the project I’ve been casually working on for a while except you did it I way better! Props to you!
i learnt infix, prefix and postfix expressions in my CS class in 12th grade
really interesting to see a practical application of it
You make it look easy, parsing expressions can be very tricky even when just coding, great job!
This was an amazing watch! Great job, I love how it all came together :D
I love seeing new vids of yours. I am not that great at math, I can barely make anything with redstone, but I do love Minecraft and learning. Wholesome, informative, and entertaining content as always ❤
I've been making calculators and other architectural stuff in redstone for years.
yet, this is hands down the most invested I have been watching a technical redstone video yet xD
I really really did not expect this video to get that interesting
that's some great progress! it feels better than any other redstone calculator ever. your breakthrough, i can sense that others might build complex calculator with just redstone too. there's just 1 unrelated problem i see: point digits precision. currently, this can display up to 3 digits of fraction, then it's gone. like "0.142". it's not a problem if you didn't want more precision and didn't want to see what the next digit of places is. here's the example where it outputs the same value. 1/999=" 0.001", 1/1000="0.001". and then after 1000 it either just goes to 0. but for how much it took, i can't complain too much...
Fun fact: Postfix is also called Reverse Polish Notation, and was used in older calculators. To save processing power, you had to write in RPN
HP calculators and their descendants famously still allow the use of RPN. It doesn’t just save processing power; it can also be way faster and less error-prone to use, since you never have to type parens and the intermediate steps you’re doing are right there on the stack.
In theory you could make it interpret forth in mc with this calculator
dude, you managed to describe postfix vs infix in like 30 seconds with more clarity than my 25 minute class did. MASSIVE props!
I think a history display of recent equations and results would be cool and relatively easy.
The most important thing for doing more advanced math would be variables and an "answer" button like a TI84. The answer token lets you use the result of the last equation in the middle of a new one, allowing for stuff like "1/Ans".
"Dude whats 6 x 2?"
"Wait lemme launch Minecraft"
PEMDAS: Please Excuse My Dope-Ass Swag
6:30 that is really, really useful.
Congratulations bro
This is amazing
8:33 Fun fact: literally anywhere in academia above high school, the PEMDAS order is slightly modified. For example, the notorious 6/2(1+2) has two *CORRECT* answers depending on which version of PEMDAS you follow. The first one, taught in high school and shown in this video would give you this: 6/2(1+2) = 6/2(3) = 3(3) = 9. The second one treats parentheses a little differently. If they're directly next to a number (or variable), that multiplication takes priority, which would give you this: 6/2(1+2) = 6/2(3) = 6/6 = 1.
This difference comes from the origin of the division symbol (the 2 dots and a line in the middle). It's actually a fraction with dots replacing the numerator and denominator. If you were to write it down, 6/2(1+3) would be 6 in the numerator position and the rest would go below in the denominator position. If you want to end a fraction in any scientific calculator, you need to add an operator or a space to tell it that the fraction is done. If you wanted to get 9 no matter what PEMDAS you use, you'd have to write it as 6/2*(1+2), 6/2 (1+2), or even better 6/2 * (1+2). And if you really want to avoid any confusion, spam the parentheses: (6/2)(1+2) to get 9 and 6/(2(1+2)) to get 1.
Good to know!
From what it looked like, it didn't seem like this calculator implements implied multiplication, so this matter wouldn't really come up. Most programming languages don't support implied multiplication either, though it's actually possible to argue that implied multiplication acts more like a function call than an arithmetic operator, and function calls do generally bind more strongly than arithmetic operators.
0:45 decimal point? I feel like fixed point arithmetic is coming.
Edit: 3:12 YEAAAAAAA I GUESSED IT!!!!
nice one
😂
I love redstone, but more importantly, I love the computers and the workings behind them. You've earned a subscriber!
Bro you are CRAZY you are the best
Hello, I am a guy who really loves your videos and I have an idea for you. You don't have to make it if you don't want to but you can. You should make a calculator that can talk to you or do simple tasks for you. I think it is a really cool idea but it would be very difficult to make and isn't really logical redstone.
it's incredible how you turn computer algorithms in to redstone circuit. and every project is a new feat!
This looks amazing super well-made
There is actually a different way to represent decimals: Internal fractions, which can optimise division and multiplication as well.
Actualy insane how you managed to pull this off
bro finally built the FPU
You are doing so much for the redstone community its insane
This is exactly what I need! I've been struggling to make an evaluator that uses PEMDAS!
next step: variables, and extending the calculator so it can use those and not only numbers
then: functions, strings, and other types like boolean, none, and then lists.
variable scope can become non trivial if you allow nested function or closures (function that are returned by another and still need to acces their parent function scope)
the call stack can be a pain with closures.
if you're adding classes, or modules or namespaces, the dot operator becomes necessary too.
I'm working on a language of my own, that's pretty cool to see you make one in minecraft
You might wanna share your language in the ProgrammingLanguages subreddit, i'm sure they'd be thrilled to learn about it
holy, good job i LOVE your channel
I suggest to use glow ink sacs with black dye on the siigns for better visibility, or white dye on signs with darker wood.
I consider Shunting Yard one of the most important and useful algorithms in computer science, and I love how elegant it is. I've implemented it in software several times, typically when I'm creating custom programming languages for fun, but I don't think I've ever considered building redstone hardware to do it 😂 Well done!
And now that you're an expert at building tokenizers... your next step is to build a full compiler for a redstone-based programming language 😁
10:40 there are tons of esoteric programming languages where arithmetic works like this, the general term is stack based but my favorite is brainflak
Stack-based languages often use pre/postfix for arithmetic, but you can have pre/postfix arithmetic outside of stack-based langauages, e.g. the Lisp family. There's also non-esoteric stack-based languages such as Forth.
Really good work. Love yozr Videos. Keep it up
Ok now this is just REALLY impressive. You are so insanely good at computer redstone than what I originally thought of you.
I understand people need bread, but like 40 bucks for a beginners course sounds a bit expensive ngl. most people probably couldn't fork out that much money per week honestly
also you'd need to consider that the demographic of the course would most likely be teenagers to young adults which means they'd probably have little to no money to go to this
40 bucks gets you a solid understanding of low level memory management a solid understanding of assembly and much more is a steal for me
@BoredEditor4k iirc they said 40$ a week. my family is upper middle class and would say no rather instantly, don't know how you would comfortably pay for that. if it was 40$ a month, then I wouldn't have commented anything
@@emerald5567 I'll gladly take away 40$ to get teached the concept of assembly
@@BoredEditor4k you do you, I'd rather not pay for the equivalent of a steam game every week.
I understand that a lot of effot anstuff goes to these recess but 20$/week is a lot, that's like 100zł, there is no way i coud ever possibly afford that
while you have only digits and the 4 basique operations, you know that every result will be in Q (set of fraction) so you can store any number with 1 int and one signed int and then when display is needed, display the result with a decimal approximation
7:50 interesting. In the compiler I just made a - with nothing on the left, it implicitly adds a 0 token.
0:0
appearently to the calculator:
32767.999
thats the real output lol
I suppose the calculator should have had something to prevent zero division
well considering the fact that 32767 is the highest 14 bit binary number, and 9 is the largest decimal number, and it is in the decimal place, I think it's safe to say the calculator is trying to output infinity but doesn't have enough space to. would've be funny if matt added the tnt from his old calculator
@@manidhingra5192 largest 15-bit I believe (2^15-1), which makes the integer part probably a 16-bit signed integer
@@thevalarauka101 I looked through the world download and the output seemed to be 32 bit input and 32 bit output with the carry ignored, but if the highest number is 32767, it means the highest number is 14 1s, which would be a 15 bit signed integer, if it's got 3 decimal places it probably can't exceed 12 bits past the decimal point, so not sure what the other bits are doing, maybe you're right and it's just 16 bits and 16 decimal
@@manidhingra5192 16 bits decimal would give a minimum value of 1/65536, which is about 0.000015; even having 4 decimal places would appear fairly imprecise in places, so it kind of makes sense to show just 3
"That looks easy"
This is pretty great! I hope you, or someone, makes one with variables. Something like a simplified version of a Ti-84, maybe.
Also, if you want mathematical accuracy, it might be good to keep track of ratios of whole numbers instead of using fixed or floating point, and... There's likely a way to handle irrational numbers as accurately as necessary for any given level of precision you design for as well, but I don't know how.
yo matt this is the coolest thing iv ever seen
honestly, i dont care about the showcase, I come for the problem solving and engineering.
great work as always.
FINALLY NEW VIDEO!!! nice, let's ser what calculator v3 does
The redstone builds become so hard, that there is an actual class about redstone 💀
You had to implement a parser in redstone. I salute you!
COOL CALCULATOR AND THIS VID IS AWSOME
16:59 I thought you were gonna rap to explain the calculator.
Okay, now make every function from windows calculator: dms, deg, floor, round, ceil, sin, cos, tan, cot, sec, csc, inverse trigs, hyperbolic trigs, all trigs but in radians, grads, mod, Gamma function (hidden under ! button), sqrt, exp, …
Edited: Ultimate challenge: make Wolphram Alpha.
*Wolfram
Not just windows calculator, also other basic scientific calculators
This video is perfectly timed thank you!! I’m writing a calculator as a project in college and Shunting Yard was exactly what I needed 🫶
What?! You have make a math expr interpreter in Minecraft, when I was still struggle to figure out how to build one in C, but this video help me a lot!
You’re actually insane
Might be revolutionary for redstone computers going forward
wth is even that, i mean like, just how
And, or, xor , not
it’s Minecraft
@@Fluniumthat to
@@atom1kcreeper605 too*
man i struggled to do a "windows styled" calculator in a windows form enviroment in coding class. Very cool
Is this what this new slang term “calc” is short for?
never heard of that
@@vibaj16 FOR THOSE OF YOU WHO JUST JOINED STREAM, calc is short for calculator. I’m just using slang, guys ☝️😔
Its just short for calculator
Not specifically a redstone calc
@@thisisricki5599 thanks, I just joined stream 😔
nice, today i made a ROM system that has circles stored in it, took inspiration from your MS paint vid mattbatwings
Dude. You're insane. Absolutely insane.
Always a great day when matt uploads
13:50 fun fact you only need one subtractor because -u# = 0-b# where # is the input
Funny, where I'm from, we call PEMDAS "BODMAS" It means the same thing but it stands for "brackets, ordinals, division, multiplication, addition, subtraction"
We really got Redstone school before gta 6 💀
Sounds like music to my ears I literally just got home from a long day of band comp
Very cool video as always!
"postfix" notation is also sometimes called "reverse polish notation"(and some scientific calculators use it or can use it directly).
All these parsers in Minecraft redstone projects lately got me thinking... How long until the first Minecraft CPU has it's own redstone-based assembler/compiler?
I think someone has nearly done this a long time ago but I don’t remember who. (Except the assembler weren’t in game, it was an external program which created a schematic for the ROM that gets pasted in to the world)
@@samuelhulme8347 Yes, people have built Minecraft CPUs with external assemblers/compilers - I'm actually nearly complete on mine. But I really want to see an *in-game* assembler/compiler, with no external tools needed! I wouldn't even mind if it uses command blocks, and more complicated parsers have been built in Minecraft before(e.g. SethBlings BASIC interpreter including lexer/parser/interpreter), although a "survival-friendly" version definitely could be build and would be cool!
I go to college for electrical and computer engineering. This and the programable computer video taught me more in an hour or so than two professors could in an entire year.
what the shit.
I put it to the ultimate test of calculating 1/0 and the answer was 32767.999. Maybe this calculator is smarter than all of us combined.
1/0 should give you an infinite number (function 1/x decreases on the range (0; +inf)). But this calculator doesn't have inf, so it just returns the maximum number it can handle
It was a joke
Aw sadly no complex numbers. qwq
Still, this thing is AMAZING!!! I love it, you did amazing! :3
Nice, very impressive, now make it turing complete
The man keeps going! Someday we'll see a minecraft, in 4k, in minecraft.