Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. JordiGH (jordigh@mathstodon.xyz)'s status on Thursday, 20-Jun-2019 11:39:18 EDT JordiGH JordiGH

    #Javascript doesn't have a built-in method to get the #epsilon of a number. It only has the epsilon of 1.

    The way to get the epsilon of any other number is

    \[
    2^{\lfloor \log_2 x\rfloor} \epsilon
    \]

    or Math.pow(2, Math.floor(Math.log(x)/Math.log(2)))*Number.EPSILON for you non-mathjaxed instance dwellers.

    Isn't there a cleaner way?

    In conversation Thursday, 20-Jun-2019 11:39:18 EDT from mathstodon.xyz permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.