To base and binadd

Here.

It uses Javascript, but only this:

return (+num).toString(+radix);

Ugh, no need for JS. Why not this:


This was really just a project to test out that little tiny bit of JS. BTW if I'm not mistaken, your code doesn't handle non-integers, but the JS one does:
untitled script pic (81)

True. I'll have to think about how to do that, although I think it's just a matter of a different end test in the IF, and just throwing in a decimal point when the value left to convert gets less than one.

I've made a pure-Snap! number-to-binary project that supports negative numbers and non-integers. You can also encode a number with the encoding mentioned here.

This made me laugh. I'm not sure I've ever seen something with "helper helper" in its name before! :~)

I'm still trying to figure out why helper helper doesn't go on forever with repeating decimals... oh, I guess because the floating point format loses precision?

Anyway, nice project!

Exactly.