You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a list of all the language inconsistencies with certain implementations in the Algorithm Archive
Monte Carlo: in_circle(...) function reads in a radius in some languages and does not in others. Note: I personally think that these functions should not read in a radius parameter, simply because it is easier to pass around function pointers to similar in_shape(...) functions if we just use x and y as our parameters. Feel free to disagree.
I figure we should consistently update this list as more of these inconsistencies are found.
The text was updated successfully, but these errors were encountered:
I believe it was the gauss elimination chapter where a language (I want to say python) outputs things in a different order than the rest. Will check once i have the chance. Not a big problem, but more a slight inconsistency
EDIT:
So what I found so far in the gauss chapter code is that
Rust only prints the Solution,
Go prints original matrix, Gauss elimination, Gauss-Jordan, Solution in that Order (my preferred way)
Julia only prints 3 Arrays of which i assume the last one is the solution, but without any description
JS prints Gauss, Gauss-Jordan, Solution
Java prints Gauss, Gauss-Jordan, Solution
Haskell doesn't work with the standard ghc (a new issue I assume?) but should print Original Matrix, Echelon Form, Reduced Echelon Form and Solution in that order
C prints Gauss, Gauss-Jordan, Solution
C++ prints Original Matrix, Gauss, Solution, Gauss-Jordan
Personally I prefer the way go does it, so original matrix, Gauss elimination, Gauss-Jordan, Solution and also with a line that says what we are currently looking at.
EDIT 2:
Not sure how important that is but in case the matrix would be singular:
Go, C, Java, JS and Julia continue the loop and print that the matrix is singular
C++, Haskell and Python continue the loop but don't print anything
Rust prints that the matrix is singular but returns and doesn't continue
Notice
Description
This is a list of all the language inconsistencies with certain implementations in the Algorithm Archive
in_circle(...)
function reads in a radius in some languages and does not in others. Note: I personally think that these functions should not read in aradius
parameter, simply because it is easier to pass around function pointers to similarin_shape(...)
functions if we just usex
andy
as our parameters. Feel free to disagree.I figure we should consistently update this list as more of these inconsistencies are found.
The text was updated successfully, but these errors were encountered: