MySQL Forums
Forum List  »  Newbie

Re: Math function logarithm
Posted by: Peter Brawley
Date: March 15, 2011 10:53AM

set @x=743.7585697483, @y=743.5888244369;
select ln(@x/@y) as vars, ln(743.7585697483/743.5888244369) as literal;
+------------------------+------------------------+
| vars                   | literal                |
+------------------------+------------------------+
| 0.00022825240801256023 | 0.00022825240801256023 |
+------------------------+------------------------+
drop table if exists t;
create table t(x decimal(15,10),y decimal(15,10));
insert into t values(743.7585697483,743.5888244369),(@x,@y);
select x,y,ln(x/y) from t;
+----------------+----------------+------------------------+
| x              | y              | ln(x/y)                |
+----------------+----------------+------------------------+
| 743.7585697483 | 743.5888244369 | 0.00022825240801256023 |
| 743.7585697483 | 743.5888244369 | 0.00022825240801256023 |
+----------------+----------------+------------------------+

PB
http://www.artfulsoftware.com

Options: ReplyQuote


Subject
Written By
Posted
March 15, 2011 10:06AM
Re: Math function logarithm
March 15, 2011 10:53AM
March 15, 2011 12:03PM
March 17, 2011 07:59PM
March 18, 2011 02:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.