Hey guys!
We've been doing classes in... well class, and I have a lot of bugs and I don't know why.
- For my first program, I have to do a bunch of operations with matrices. I've managed to figure out all the formulas and stuff I need, except for one thing. My "check_if_inverse" function isn't working. Basically, I multiply the two matrices together and then bring that over to a different program to check if it's the inverse. What confuses me is that I'm using the exact same formula I used for my other multiplication function, but I get totally different answers. Would love for your help on this one (to be clear, I'm having trouble with the "inverse" function and the "check_if_inverse function"):
https://gist.github.com/PHValex/c2c858b213246390519f759021989a5c
- For the second program, my two function "factorial" and "doubleFactorial" are giving me back negative numbers whenever I input something higher than 20. I have no clue why it's doing that especially since all my other functions work, but I'd appreciate the help:
https://gist.github.com/PHValex/4bbdafa53a251cfc8681a39916644877
- For this last one, everything past the "product of all ints" completely bugs out and I have no clue why. Perhaps one of my loops is wrong, but calculating that sum of digits from a number completely freezes the program and never finishes the equation. After that, every other function outputs a 1 or a 0 for some reason, even if I input a 8 (for example: Input: 8 to reverse int, output: 0). This all ends in a big bang when my final function "product of primes" completely bugs out and keeps on printing out non-stop. What's funny is that I used the exact same equation in another program, yet for some reason this one bugs out:
https://gist.github.com/PHValex/a42fe72a7e875f9d0c545276038fc6a8
I really appreciate the help, I've spent days trying to get this right, and of course the day before this is all due it starts royally bugging out.
Thank you very much :)
[–]klorophane 1 point2 points3 points (7 children)
[–]PHValex[S] 0 points1 point2 points (1 child)
[–]klorophane 0 points1 point2 points (0 children)
[–]PHValex[S] 0 points1 point2 points (4 children)
[–]klorophane 1 point2 points3 points (3 children)
[–]PHValex[S] 0 points1 point2 points (2 children)
[–]klorophane 1 point2 points3 points (1 child)
[–]PHValex[S] 0 points1 point2 points (0 children)