Solved

How can I make numbers less extreem by a decimal value?

Posted on 2013-02-06
3
235 Views
Last Modified: 2013-02-06
x is a number between 0.00000001 and 1.  If x is 1 then y should remain exactly the same. If the number is 0.00000001 then y should be very close to 1.

I need this in JavaScript but I can write the JavaScript code if you can help me with the logic.

Thanks!
0
Comment
Question by:hankknight
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 38862237
y = Math.pow(y,x)
0
 
LVL 16

Author Comment

by:hankknight
ID: 38862262
Wow!  Perfect, thanks.
0
 
LVL 84

Expert Comment

by:ozo
ID: 38862266
or
y = (y-1)*x + 1
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: Nicole
This is a research brief on the potential colonization of humans on Mars.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now