symbol math implementation on JavaScript