Microsoft KB Archive/106305

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

INF: How to Calculate the Nth Root of a Number

Article ID: Q106305
Creation Date: 04-NOV-1993
Revision Date: 01-DEC-1996 The information in this article applies to:

  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SUMMARY


Moderate: Requires basic macro, coding, and interoperability skills.

To find the nth root of a number, raise that number to the power of 1/n. The general form of the equation is

   <num>^(1/<n>)

where <num> is the number whose root you want to find, and <n> is the root. This equation can be used anywhere in Microsoft Access where expressions are allowed. MORE INFORMATION


The following example demonstrates how to use the equation described above:

  1. Create the following new table:

          Table: Table1
          ----------------------
          Field Name: Number
             Data Type: Number
             Field Size: Double
          Field Name: Root
             Data Type: Number
             Field Size: Integer
  2. Save the table, and then view it in Datasheet view. Add the following records to the table:

          Number      Root
          ----------------
            8          3
           16          4
           32          5
          243          5
  3. Create the following new query based on Table1:

          Query: Query1
          ---------------------------------
          Type: Select Query
          Field: Number
             Table: Table1
          Field: Root
             Table: Table1
          Field: Expr1: [Number]^(1/[Root])
  4. Run the query.



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

©1997 Microsoft Corporation. All rights reserved. Legal Notices.


KBCategory: kbusage kbhowto
KBSubcategory: ExrOthr
Additional reference words: 1.00 1.10 2.00 7.00 97 8.00 exponential
square cube radical