Open petty opened 10 years ago
The beauty of five is that you can make any number you want.
Want three()
? Well that's just
(five() * five() - five() - five()) / five()
or (five() + five() + five())/five()
Want six()
? five() + (five()/five())
Want zero()
? five() - five()
@Joezo You left pi :stuck_out_tongue_winking_eye:
@dufferzafar we can estimate pi: ( (five() * five() ) - ( ( five() + five() + five() ) / five() ) ) / ( five() + ( ( five() + five() ) / five() ) )
@dufferzafar easiest way to get pi is through builtin Math
object like this
var five = require('five');
Math[Buffer(((five() * five()) - (five() / five()) + ((five() * ((five() / five()) + (five() / five()))) * five() * five() * five()) * (five() - (five() / five())) + (five() * five())).toString(), 'hex').toString('utf8')]
@shackpank I have tears in my eyes and my belly hurts from laughing. Far and away the best response ever made to any question ever asked in the history of GitHub.
May five()
live forever :rocket:
Most numbers already have their own NPM packages!
This is just a few (not all of them have github repos)
integer-value-positive-zero
package like this and then require it and do zero()
the-number-one
. It's not a function so you just do one
two
package and do two()
numeric-constant-three
package and do three()
always-four
package and do four()
number-six
package and do six()
se7en
package and do seven()
eight-toolkit
package and to get eight you do eightToolkit.constants.EIGHT
or you can do const eight = require('eight-toolkit').constants.EIGHT
and then just write eight
value-nine
package and do nine()
the-number-ten
package and do ten
eleven
package and do eleven()
twlv
package and do twelve()
always-thirteen
package and do thirteen()
fourteen
package and do fourteen
(it's not a function)number-fifteen
package and do fifteen
(also not a function)sixteen-constant
package and do sixteen
(not a function)seventeen-integer
package and do seventeen()
(a function)eighteen-positive-number-interactions
package and do eighteen()
(a function)nineteenify
package and do nineteenify()
numbertwenty
package and do twenty()
always-21
package and do twentyone()
twentytwo
package and do twentytwo()
twenty-three-tools
package and do twentyThreeTools.TWENTY_THREE
(not a function)get-intrinsic
package and do const pi = GetIntrinsic("%Math.PI")
and then to use pi do pi
false
package by MDE and import it and call it f
and use it like this: f()
true
package by MDE, and import it as t
and use it like this: t()
qc-core
package and do qcCore.nullFn()
for null.undefined-is-a-function
package and then run undefined()
(for some reason you can name variables undefined in js)nan-is-a-function
package and then call it like this: _NaN()
If you want me to recommend any more packages, just ask!
Also you can use the solution by @Joezo but with jQuery like this:
require('vanilla-javascript')
require('vapor-js-npm')
require('none')()
global.jQuery = require('jquery')
require('jquery-basic-arithmetic-plugin')
const five = require('five')
// then to get three do:
const THREE = jQuery.divide(jQuery.subtract(jQuery.multiply(five(), five()), five() , five()), five())
On the one hand … this is great, quite literally.
But after searching Github, I’ve been unable to find the rest of the set. For example, what about three()? and what about constants, like pi()?
I understand that making all numbers overly complicated could take time, so what’s the ETA?