GithubHelp home page GithubHelp logo

Comments (3)

joshuaulrich avatar joshuaulrich commented on June 4, 2024

This is related to floating point precision, and has nothing to do with nanotime. What Every Computer Scientist Should Know About Floating-Point Arithmetic provides a lot of background for why this is an issue and how to work around it.

Your precision never existed, even before you called nanotime():

1531830678123456789
# [1] 1.531831e+18
sprintf("%f", 1531830678123456789)
# [1] "1531830678123456768.000000"

And this works:

nanotime(bit64::as.integer64("1531830678123456789"))
[1] "2018-07-17T12:31:18.123456789+00:00"

from nanotime.

wsrfad avatar wsrfad commented on June 4, 2024

Exactly ! That's why I was using time in character and then passing to nanotime. But eddelbuettel is hell bent on telling me that I do not do my homework ! Plz neither underestimate nor ridicule the feedback givers

from nanotime.

eddelbuettel avatar eddelbuettel commented on June 4, 2024

@wsrfad One more time-wasting issue like this and I will block you. This serves as a warning. Your call.

from nanotime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.