Another really short patchlog:
Have a nice day and happy coding!
Log in to leave a comment
Short check-in: I added more stuff to functions and finally converted the library to use doubles in every class rather than floats. Hooray! Probably gonna ship this soon, so, hopes are up!
Log in to leave a comment
Okay, so I made a few updates. First off, I extended the functionality of my Function class, particularly the “FunctionPart” record with the addition of “FunctionPartType,” which is an enum that determines how the x-variable is treated when sampling the value of a FunctionPart. Right now there’s a few modes for the “FunctionPartType” with more coming sometime, such as: Ln, Log, Sqrt, general root, and of course, no modifications. Along with these features I added new functions to “Misc” for taking custom roots outside of Sqrt and Cbrt, as well as a logarithm function that allows you to input a custom base. And last, but not least, I added a function to calculate the factorial value of a number, why? Just for fun! It’s nice to have these little functions sometimes, so why not add ‘em?
I also did a bit more, but I don’t really have the time to write about it all, especially because I feel like everybody is looking at my screen and I really don’t want anybody in real life to find my online username.
Anyhow! Next up I wanna refactor the entire library, because I noticed that Java seems to prefer doubles a lot more than floats. Why didn’t I use doubles from the get-go? Stubbornness, I’m used to using floats from previous projects and so I really didn’t wanna give up my old habits, but, putting float conversions everywhere is starting to get extremely annoying. So next devlog will probably be about a migration to a new system!
And that wraps it up, I think. I’m gonna go now. I hope that, whoever has read this, had a nice time seeing my progress. Have a good day and happy coding!
Log in to leave a comment
Ok, I got bored of fractions and decided to start on implementing the function system. It may not be the most intuitive system, as you may see from the first screenshot, but I can tell you one thing. It freakin’ works! I am so happy to see that this system works first-try without a hitch, seriously! By the way, the third image shows the polynomial from the tests (graphed in GeoGebra). I am excited to see how I can implement this function system into some personal projects when I finish this library, speaking of which… where to next? Well, I’m honestly not sure, I thought about doing complex numbers, but I don’t know if I can faithfully implement them given that I know nothing about them except for (sqrt(-1) = i) and (i^2 = -1), oh and Euler’s expression (e^(pi*i) + 1 = 0). So that probably doesn’t suffice. I could definitely add some functions to my function class, like creating derivatives, making anti-derivatives, calculating integrals (would require anti-derivatives), finding spots where the function equals 0, limits, basically whatever algebra I was taught in my high school career. Though finding intersections for the x-axis would cause issues with trigonometric functions, hm. I guess I’ll have to figure it out later, for now, I’m celebrating because my function class works!
Log in to leave a comment
I added the equality function to my fraction class! Right now it throws an IllegalArgumentException when you don’t give it a fraction, but I hope to expand it to accept numerical inputs too, which will make the code in my fraction test class look just a bit nicer. Alongside this I also added my own float equality function, since I couldn’t find anything outside of the “==” operator, which I have been told is unreliable. Maybe I’m wrong though, who knows! I’ll definitely test using the regular operator soon.
Log in to leave a comment
I got all the basic arithmetic operations (addition, subtraction, multiplication and division) up and running alongside their respective unit tests and some extra functions like inversing a fraction, which actually came in really useful when doing division. I guess this goes to show how little I remember about fractions from school, since I had to look most of this stuff up lol. Guess that’s what I get for staying loyal to decimal numbers. Thanks for reading!
Log in to leave a comment
Just in time! Managed to implement fraction simplification, which was actually quite a fun challenge. I managed to find an implementation of the GCD/HCF and LCM in my files from a previous project from computer science class, which actually gave me the inspiration to make this. I know this progress is quite insignificant and not worthy of a devlog, but screw it. See y’all later and thank you for reading!
Log in to leave a comment
Okay, quick check-in that I’m typing in the midst of AP English. I wrote an extremely basic fraction class! It’s, as stated earlier, not complete at all since it doesn’t feature basic arithmetic operations yet as well as having no special features such as minimizing the fraction.
Hopefully I can get some of those basic functions up and unit tested within the hour. Guess we’ll see what the next 20 minutes bear.
Thank you for reading!
Log in to leave a comment
Making a library with Maven was jarring to say the least. I had difficulty figuring out how to have my IntelliJ project compile into a Java library file. Luckily after some research and with help from the lovely JetBrains docs (https://docs.gradle.org/current/samples/sample_building_java_libraries.html) I was able to figure it all out.
Excuse me if this devlog is poorly written, I am tired and just want to go to bed so I cba to write something cohesive.
Goals for tomorrow: outside of working on my other project (UdpClub), I want to use the little free time I have at school to work on some fundamental classes for this project, such as a fraction class and maybe even the first steps of making a function framework to build and chart out things like polynomials.
Good night, everybody and happy coding!
Log in to leave a comment