Results 1 to 9 of 9
- 03-12-2010, 12:32 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 68
- Rep Power
- 0
gov.sns.tools.math.ElementaryFunction
This package contains classes that contain methods to find the inverse hyerbolic functions directly by taking double as input ... i searched a lot to find the .jar containing this package but i'm unable to find..
By the way I found another jar containing another package -- org.nfunk.jep.function .. this package too contains methods that claim to find the inverse hyperbolic functions but these methods take "Object" as input ....
and return as incompatible format...i succeeded in finding hyperbolic results by converting the object first into string and then the string into double.. but applying the same procedure for the inverse hyperbolic functions result into formats as "(5.192925985263684, 0.0)" so i am not able to extract value of my interest..
http://mirrors.ibiblio.org/pub/mirro...s/jep-2.24.jar
Java Code:import org.nfunk.jep.function.*; import org.nfunk.jep.ParseException; public class xMain { public static void main(String[] args) { try { ArcCosineH obj = new ArcCosineH(); System.out.println(obj.acosh(90)); System.out.println(Double.valueOf(obj.acosh(90).toString()).doubleValue()); } catch (ParseException po) { } } }
the pakage i mentioned the first in the title takes input as double and results into double so thats no problem ... but i am not able to find the jar for the same ...please help me finding the jar file for this package..
- 03-12-2010, 12:36 PM #2
Member
- Join Date
- Feb 2010
- Posts
- 68
- Rep Power
- 0
- 03-12-2010, 01:07 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Most likely that function anticipates for values < 1 where the answer is supposed to be a complex number. I peeked into that .jar and indeed I saw a Complex.class so I'm probably right. The answer to acosh(90) is correct and the imaginary component of the answer is zero. The expansion of that function is: acosh(z) == ln(z+sqrt(z-1)*sqrt(z+1))
kind regards,
Jos
- 03-12-2010, 01:14 PM #4
Member
- Join Date
- Feb 2010
- Posts
- 68
- Rep Power
- 0
yes you are right!I peeked into that .jar and indeed I saw a Complex.class so I'm probably right.
.. and i do know the alternativeThe expansion of that function is: acosh(z) == ln(z+sqrt(z-1)*sqrt(z+1))
BUt if i have an option for the direct implementationthat would be more pratical and time saving too !gov.sns.tools.math.ElementaryFunction
Isn't there any way to extract the real part??"(5.192925985263684, 0.0)"
- 03-12-2010, 01:15 PM #5
Member
- Join Date
- Feb 2010
- Posts
- 68
- Rep Power
- 0
can you help me finding the .jar file for the package that i mentioned in the title of this thread . thnx
- 03-12-2010, 01:34 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
I don't know; that .jar should have a description of its API, otherwise it's useless. My guess would be that the Complex class has the appropriate methods, e.g. getRealPart() and getImaginaryPart() (or similar). Never use a jar that you have scraped from the net without any documentation, programming is not a guessing game.
kind regards,
Jos
- 03-12-2010, 01:36 PM #7
Member
- Join Date
- Feb 2010
- Posts
- 68
- Rep Power
- 0
and what about the other package
??
- 03-12-2010, 01:44 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 03-12-2010, 01:49 PM #9
Member
- Join Date
- Feb 2010
- Posts
- 68
- Rep Power
- 0
Similar Threads
-
50 tools for Java!
By amylein in forum Java AppletsReplies: 1Last Post: 11-12-2009, 07:46 AM -
LF: Tools in Java for RAD
By laurence.abas in forum SWT / JFaceReplies: 0Last Post: 07-16-2009, 08:15 AM -
Need to know about tools.jar
By nn12 in forum New To JavaReplies: 5Last Post: 01-07-2009, 07:27 AM -
New to java, need tools
By thenarin in forum New To JavaReplies: 3Last Post: 12-10-2008, 12:56 PM -
Bug tools
By mew in forum Advanced JavaReplies: 1Last Post: 01-20-2008, 08:51 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks