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

  • Home
  • SEARCH
  • 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 402339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:06:58+00:00 2026-05-12T17:06:58+00:00

When I try to take the N th root of a small number using

  • 0

When I try to take the N th root of a small number using C# I get a wrong number.

For example, when I try to take the third root of 1.07, I get 1, which is clearly not true.

Here is the exact code I am using to get the third root.

MessageBox.Show(Math.Pow(1.07,(1/3)).toString());

How do I solve this problem?

I would guess that this is a floating point arithmetic issue, but I don’t know how to handle it.

  • 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-05-12T17:06:58+00:00Added an answer on May 12, 2026 at 5:06 pm

    I’m pretty sure the “exact code” you give doesn’t compile.

    MessageBox.Show(Math.Pow(1.07,(1/3).toString()));
    

    The call to toString is at the wrong nesting level, needs to be ToString, and (1/3) is integer division, which is probably the real problem you’re having. (1/3) is 0 and anything to the zeroth power is 1. You need to use (1.0/3.0) or (1d/3d) or …

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

Sidebar

Related Questions

Take for example the following code: try { Response.Redirect(someurl); } finally { // Will
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
I try to add an addons system to my Windows.Net application using Reflection; but
We try to convert from string to Byte[] using the following Java code: String
Try as I might I cannot get my head around what the IteratorIterator class
I get this error everytime I try to access phpmyadmin. http://i49.tinypic.com/ot1478.jpg I cant access
I'm calculating the Euclidean distance between n-dimensional points using OpenCL. I get two lists
I try to design my app to find database entries which are similar. Let's
I will try to be as brief as possible, please stay with me here
try { ... } catch (SQLException sqle) { String theError = (sqle).getSQLState(); ... }

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.