Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:20:12+00:00 2026-06-07T02:20:12+00:00

If I write document.write(Math.sqrt(2)) on my HTML page, I get 1.4142135623730951 . Is there

  • 0

If I write document.write(Math.sqrt(2)) on my HTML page, I get 1.4142135623730951.

Is there any way to make the method output more than 16 decimal places?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:20:15+00:00Added an answer on June 7, 2026 at 2:20 am

    No, there is not. Mathematical operations in Javascript are performed using 64-bit floating point values, and 16 digits of precision is right around the limit of what they can represent accurately.

    To get more digits of the result, you will need to use an arbitrary-precision math library. I’m not aware offhand of any of these for Javascript that support square roots, though — the one I was able to find offhand (Big.js) only supports addition, subtraction, and comparisons.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this response.write on my page function roundthecon() { document.write(Math.round(exchRate*Math.pow(10,2))/Math.pow(10,2)); } But it
If I write this: document.createElement(img) The generated html is: <img> , and I can
I have a variable when i write its value using document.write() i don't get
I have this: script_url = 'http://externaldomain.com/script.js' div_id = 'div'+Math.floor(Math.random() * 1000000); document.write('<div id='+div_id+'><scr'+'ipt id=banner-to-load></scr'+'ipt></div>')
function a(delay){ this.randomVal = Math.random(); window.setTimeout(function(){ document.write('function a called - '+this.randomVal+' '+delay+'<br/>'); }, delay)
<script language=JavaScript type=text/JavaScript> // generate random number 1-3 Num = Math.round(Math.random() * 3); document.write(Num);
I am starting to write an application that will output an OpenOffice document. The
Hey guys, My array is printing it's values on page when: document.write(unsorted[i]+<br/>); but not
why when i write document.getElementByClass('home1').setAttribute('style', 'background-image:url(img/red_menu.PNG);'); it doesn't work? i have the element with
document.write('test'); Will work, and print 'test' to the document. document.write(d.toDateString()); Does nothing. d is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.