[DOC] Add documentation and comments.
[DOC][FIX] Add documentation and correct quartic function.