Go Premium for a chance to win a PS4. Enter to Win

x
Solved

# exp statment

Posted on 1998-04-29
Medium Priority
259 Views
i ask how i write mathametical equation with exponenital as the follow
y = exp (-100 * x);
but i have the floating overflow error at run time , so i ask  if i can write this equation
using ( ln) statement instead of exp and if yes how can i write the y expresion
bu using ln ..
Thank .. Saleh
0
Question by:saleh

LVL 3

Accepted Solution

jlove1 earned 400 total points
ID: 1216074
well, i CAN't tell you how to do it using LN cause it's too difficult to even explain why I can't do it.  but I CAN tell you how to make your code work. Like this
y=exp(-100*x)/100000;
then whenever you're using the number in an equation, simply multiply it by 100000

This should work under almost every circumstance.
You do realize that you're winding up with a HUGE number

0

LVL 85

Expert Comment

ID: 1216075
What is the range of x?

0

Author Comment

ID: 1216076
x is the real number between [0 , 2 ]

0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
Did you know there are services out there that can turn an Instagram feed into an RSS feed? I found some interesting exclusive Instagram content which I wanted to follow without signing up for yet another social media account. RSS to the rescue!
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
###### Suggested Courses
Course of the Month9 days, 19 hours left to enroll