Solved

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

Posted on 2013-02-06
3
236 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
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)
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

863 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

19 Experts available now in Live!

Get 1:1 Help Now