div

<a href='#crh-start'></a><a href='#crh-data-%7B%22processed%22%3A%20%5B%22https%3A//github.com/swenson/gomath/pull/3%23issuecomment-60502487%22%2C%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378356%22%2C%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378360%22%2C%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378378%22%2C%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378380%22%2C%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378382%22%5D%2C%20%22comments%22%3A%20%7B%22General%20Comment%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/swenson/gomath/pull/3%23issuecomment-60502487%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Looks%20good%20overall%21%20Minor%20comments.%22%2C%20%22created_at%22%3A%20%222014-10-26T00%3A39%3A16Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/33404%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/swenson%22%7D%7D%5D%2C%20%22title%22%3A%20%22General%20Comment%22%7D%2C%20%22Pull%206d82eb98ea585cbfeba2ce2232ed8e22f5070258%20src/mathx/float/defs.go%20215%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378382%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22I%20think%20this%20is%20a%20weird%20Go-ism.%20I%20think%20if%20you%20made%20it%20%60%2AFloat%60%20it%27d%20print%20out%20the%20pointer%20address%2C%20which%20is%20unhelpful.%20%28You%20can%20try%20it%20and%20find%20out%20though%29.%22%2C%20%22created_at%22%3A%20%222014-10-26T00%3A38%3A22Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/33404%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/swenson%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/mathx/float/defs.go%3AL283-302%22%7D%2C%20%22Pull%206d82eb98ea585cbfeba2ce2232ed8e22f5070258%20src/mathx/float/defs.go%20194%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378360%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22There%27s%20no%20need%20to%20copy%20because%20we%20aren%27t%20going%20to%20change%20the%20innards%20of%20the%20number.%20The%20%60Float%60s%20are%20immutable.%20%28So%2C%20you%20wouldn%27t%20make%20a%20copy%20of%20an%20integer%2C%20like%204%2C%20before%20returning%20it%2C%20right%3F%29%22%2C%20%22created_at%22%3A%20%222014-10-26T00%3A32%3A29Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/33404%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/swenson%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/mathx/float/defs.go%3AL131-279%22%7D%2C%20%22Pull%206d82eb98ea585cbfeba2ce2232ed8e22f5070258%20src/mathx/float/defs.go%2083%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378378%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22It%20would%20be%20nice%20to%20give%20a%20comment%20block%20here%20to%20describe%20the%20algorithm%20you%20are%20using%20for%20division%2C%20as%20it%20isn%27t%20obvious%20looking%20at%20the%20code.%20%28And%20linking%20to%20WP%20even.%29%5Cr%5Cn%5Cr%5CnSomething%20like%3A%5Cr%5Cn%5Cr%5Cn%60%60%60c%5Cr%5Cn//%20Div%20implements%20division%20by%20computing%20and%20multiplying%20by%20the%20reciprocal%20of%20its%20argument.%5Cr%5Cn//%20The%20algorithm%20works%20like%3A%20...%5Cr%5Cn%60%60%60%22%2C%20%22created_at%22%3A%20%222014-10-26T00%3A36%3A11Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/33404%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/swenson%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/mathx/float/defs.go%3AL131-279%22%7D%2C%20%22Pull%206d82eb98ea585cbfeba2ce2232ed8e22f5070258%20src/mathx/float/defs.go%20149%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378380%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22I%20think%20this%20should%20take%20an%20argument%20for%20how%20much%20precision%20to%20have%2C%20instead%20of%20hardcoding%20to%2064%3F%22%2C%20%22created_at%22%3A%20%222014-10-26T00%3A37%3A08Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/33404%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/swenson%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/mathx/float/defs.go%3AL131-279%22%7D%2C%20%22Pull%206d82eb98ea585cbfeba2ce2232ed8e22f5070258%20src/mathx/float/defs.go%20101%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/swenson/gomath/pull/3%23discussion_r19378356%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Constants%20like%20this%20can%20be%20made%20into%20global%20variables%20%28to%20save%20a%20little%20bit%20of%20storage%29.%22%2C%20%22created_at%22%3A%20%222014-10-26T00%3A30%3A48Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/33404%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/swenson%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20src/mathx/float/defs.go%3AL131-279%22%7D%7D%7D'></a>
<a href='https://www.codereviewhub.com/'><img src='http://www.codereviewhub.com/site/github-bar.png' height=40></a>
- [ ] <a href='#crh-comment-Pull 6d82eb98ea585cbfeba2ce2232ed8e22f5070258 src/mathx/float/defs.go 101'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/swenson/gomath/pull/3#discussion_r19378356'>File: src/mathx/float/defs.go:L131-279</a></b>
- <a href='https://github.com/swenson'><img border=0 src='https://avatars.githubusercontent.com/u/33404?v=3' height=16 width=16'></a> Constants like this can be made into global variables (to save a little bit of storage).
- [ ] <a href='#crh-comment-Pull 6d82eb98ea585cbfeba2ce2232ed8e22f5070258 src/mathx/float/defs.go 194'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/swenson/gomath/pull/3#discussion_r19378360'>File: src/mathx/float/defs.go:L131-279</a></b>
- <a href='https://github.com/swenson'><img border=0 src='https://avatars.githubusercontent.com/u/33404?v=3' height=16 width=16'></a> There's no need to copy because we aren't going to change the innards of the number. The `Float`s are immutable. (So, you wouldn't make a copy of an integer, like 4, before returning it, right?)
- [ ] <a href='#crh-comment-Pull 6d82eb98ea585cbfeba2ce2232ed8e22f5070258 src/mathx/float/defs.go 83'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/swenson/gomath/pull/3#discussion_r19378378'>File: src/mathx/float/defs.go:L131-279</a></b>
- <a href='https://github.com/swenson'><img border=0 src='https://avatars.githubusercontent.com/u/33404?v=3' height=16 width=16'></a> It would be nice to give a comment block here to describe the algorithm you are using for division, as it isn't obvious looking at the code. (And linking to WP even.)
Something like:
```c
// Div implements division by computing and multiplying by the reciprocal of its argument.
// The algorithm works like: ...
```
- [ ] <a href='#crh-comment-Pull 6d82eb98ea585cbfeba2ce2232ed8e22f5070258 src/mathx/float/defs.go 149'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/swenson/gomath/pull/3#discussion_r19378380'>File: src/mathx/float/defs.go:L131-279</a></b>
- <a href='https://github.com/swenson'><img border=0 src='https://avatars.githubusercontent.com/u/33404?v=3' height=16 width=16'></a> I think this should take an argument for how much precision to have, instead of hardcoding to 64?
- [ ] <a href='#crh-comment-Pull 6d82eb98ea585cbfeba2ce2232ed8e22f5070258 src/mathx/float/defs.go 215'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/swenson/gomath/pull/3#discussion_r19378382'>File: src/mathx/float/defs.go:L283-302</a></b>
- <a href='https://github.com/swenson'><img border=0 src='https://avatars.githubusercontent.com/u/33404?v=3' height=16 width=16'></a> I think this is a weird Go-ism. I think if you made it `*Float` it'd print out the pointer address, which is unhelpful. (You can try it and find out though).
- [ ] <a href='#crh-comment-General Comment'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/swenson/gomath/pull/3#issuecomment-60502487'>General Comment</a></b>
- <a href='https://github.com/swenson'><img border=0 src='https://avatars.githubusercontent.com/u/33404?v=3' height=16 width=16'></a> Looks good overall! Minor comments.


<a href='https://www.codereviewhub.com/swenson/gomath/pull/3?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/swenson/gomath/pull/3?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://github.com/swenson/gomath/pull/3'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>
<a href='#crh-end'></a>