none
Exponents using Math Library RRS feed

  • Question

  • How to write this in code below using the math library
     
    1.45E-23 * 300 ?

    pianoboyCoder

    Monday, February 11, 2019 7:24 AM

Answers

  • You don't need the Math library at all. The compiler understands the exponent directly:

    double d = 1.45E-23;
    double result = d * 300;

    • Marked as answer by pianoboyCoder Wednesday, February 13, 2019 7:43 AM
    Monday, February 11, 2019 10:09 AM
    Moderator

All replies

  • You don't need the Math library at all. The compiler understands the exponent directly:

    double d = 1.45E-23;
    double result = d * 300;

    • Marked as answer by pianoboyCoder Wednesday, February 13, 2019 7:43 AM
    Monday, February 11, 2019 10:09 AM
    Moderator
  • Hi pianoboyCoder,

    Thank you for posting here.

    For your question, what do you want to do with this Exponents 1.45E-23 * 300

    If you want to use Math library, you could refer to the link below.

    https://docs.microsoft.com/en-us/dotnet/api/system.math?view=netframework-4.7.2

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, February 12, 2019 5:38 AM
    Moderator