473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Java Help URGENT needed

hi,

i want to use log(double) in my java prog. so i have imported
java.lang.Math
flanagan.math.PsRandom

now i wanna use log function in a private method inside a class.
so i try :

return (94.2)-(0.024*avg_playout_delay)-11-(40*log(1+10*avg_playout_delay));

but i get error saying "cannot find symbol" "method log(double)"

please help soon.
-thanks.
May 27 '07 #1
2 1419
markmcgookin
648 Expert 512MB
hi,

i want to use log(double) in my java prog. so i have imported
java.lang.Math
flanagan.math.PsRandom

now i wanna use log function in a private method inside a class.
so i try :

return (94.2)-(0.024*avg_playout_delay)-11-(40*log(1+10*avg_playout_delay));

but i get error saying "cannot find symbol" "method log(double)"

please help soon.
-thanks.
Hi I havent tried this or anything,

But you might be using the wrong api or something, javas api

http://java.sun.com/j2se/1.5.0/docs/api/

shows a java.maths class, and not java.lang.maths I wonder if that could be your issue? You might not be including it properly.. just a thought.

Mark

EDIT -- Actually I just found java.lang.math sorry,

log(double a) -- Returns the natural logarithm (base e) of a double value.

You might find the problem lies with the flanagan thing or a syntax issue.... try a much simpler equation to see if the function actually works, then try tweaking your syntax in your existing equation. Sorry I cant be more help, but I have never used the maths bits
May 27 '07 #2
JosAH
11,448 Expert 8TB
hi,

i want to use log(double) in my java prog. so i have imported
java.lang.Math
flanagan.math.PsRandom

now i wanna use log function in a private method inside a class.
so i try :

return (94.2)-(0.024*avg_playout_delay)-11-(40*log(1+10*avg_playout_delay));

but i get error saying "cannot find symbol" "method log(double)"

please help soon.
-thanks.
You cannot just say "import thisandthat";. where is the compiler supposed to find
the "thisandthat"? That's what the classpath variable is for. You pass the classpath
variable to the compiler and jvm itself telling them where they can expect to find
the classes you're talking about. Both javac and java take an option on the command
line as a classpath list of directories and .jar files.

kind regards,

Jos
May 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
5
by: Ananthu | last post by:
Hi I have done all the codings part for connecting mysql server with java application but when i try to compile,the compilation is successful and during execution i get the following message, ...
0
by: kayox007 | last post by:
hi am working on an applet right now that needs a string variable passed to it from the browser's URL... pls i need help cos i dont know how to go about it and ITS URGENT thanks
0
by: asti1987 | last post by:
I have a big problem, y need to print a jasper report, but it must to be with jsp. this is my jsp please help me <%@ page...
2
by: ramprakashjava | last post by:
This is index.jsp page code: <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> <%@ taglib...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.