Solved

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

Posted on 2013-02-06
3
237 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Article by: Nicole
This is a research brief on the potential colonization of humans on Mars.
This article discusses how to create an extensible mechanism for linked drop downs.
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)
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

770 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