Advanced math functions/libraries

Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.

Kramis wrote:
Are there any more advanced math functions/libraries available for Java (other than in the normal Math class)? Right now I'm looking for something that will rapidly return all the factors of an integer, but I am likely to be interested in other features in the future as well. Thanks.Not in the standard classes.
You could look at the Apache Math library:
[http://commons.apache.org/math/]
perhaps it has some number theory methods.
Or you could look into a Java bridge/interface between existing computer algebra systems (CAS) like Maple, Mathcad (both commercial) or the excellent opensource alternative: Octave. All these CAS have a bridge/interface to Java.

Similar Messages

  • Using advanced math functions in plugins

    I have an application built in LabVIEW 8.5 that calls external VIs as PlugIns. Normally adding any subVIs of these PlugIns in the same directory as the plugin is located in (or a sub-directory of that) will enable the plugin to execute (I have several such plugins that do run properly).
    The problem now however is that one of these PlugIns use a few math functions (linear fit etc.) and, although all the subVIs and dlls (including the ones from the vi.lib etc.) are located in the same directory - and the application is run on a machine that actually has the full professional LV 8.5 installed on it, it is still not executable (I've built a source distribution to get all the code it depends on out, with no exclusions). If I hit the broken run-button it says the full development system is required to resolve the issue.
    The same plugin works fine in LV 7.1.1 (although then it is distributed as a top level VI in an llb with the support-VIs in it instead).
    Is there still a way in LV 8.5 to distribute a plugin that uses the math functions without having to include the functions in the built application that will launch the plugin?
    MTO

    Hi, Mads,
    My "Quick and Dirty" test shows that it should be no any problems. Just deselect "Exclude vi.lib" Vis in the Distribution, and select that dependecies should be deployed with PlugIn. See attachment, hopefully its will be helpful for you. Such distribution way produced huge llb (because not only linear fit embedded into library, but all math library), but at least it works.
    best regards,
    Andrey.
    Attachments:
    PlugInWithMathDistributionTest.zip ‏21 KB

  • Specialized math functions?

    Hi,
    I'm quite knew here and I would like to know if there are more specialized math functions than in class Math.
    For example, I would like to work with complex numbers, integrate, differentiate, cartesian to spheric (or polar) transforms and vice versa, Fourier transforms, Matrix operations like: inverse, determinant, multiplication, size of a matrix, etc...
    I'm trying to rewrite in Java a program I had in Matlab so I can put it in an applet. If someone knows where I can find this information I'll be very grateful. Thanks in advance
    Mauricio

    JMSL is not free. Here is some packages for some of the things you said:
    http://math.nist.gov/javanumerics/

  • How to use  Advance java function in graphical mapping in XI 2.0?

    Hi,
    currently I am using a simple java function to make an RFC call to R3 system.
    I want to avoid making connection for each lookup. Instead I want to make a single connection for whole message queue and get the corresponding values in some array or container object.
    please suggest a solution.
    I think this is possible using Advance java function, but I am not able to find any example on using Advance java function at help.sap.com.
    thaks in advance.

    Hi!!!
    I'm not sure if I understood you well.
    Do you want to preload some data into your structures in the memory and keep them there so you don't need to make a new connection during processing the whole message or every message?
    In my opinion you can cache some data during processing a message, but it's impossible to cache some data between processing messages.
    If you write your java mapping or you use graphical mapping (even with user-defined function), then you have a java class. The problem is that XI 2.0 reloads this class during processing every message, so even if you load some data from your data source into your structures in the memory, this data will be lost after reloading your mapping class.
    Regards,
    Andrzej Filusz

  • Using advanced statistical functions in BO or creating your own ones

    Hello,
    Can someone tell me if it is possible to use more advanced statistical functions in BO (webi or deski f.i.) like the possibility to extrapolate figures. I only see a limited functions in Webi (mean, intrapolate, percentiles, ...).
    If not is it then possible to add own functions in the available functions?
    many regards

    I believe there are more possibilities in WEbi 4.O

  • How to invoke math functions from dbx?

    Is there an easy way to invoke math functions from dbx? If I try, for example, to call sqrt I get meaningless results:
    (dbx) print sqrt(4.0)
    sqrt(4) = 1074790400
    (dbx)
    This is from code which uses sqrt, so sqrt should be accessible. Does this need some kind of cast?

    It turns out that this is a bit different than it looks: dbx is indeed able to invoke functions invoked in this way correctly; dbx just fails to print a sensible return value.
    I tried with the following small function:
    #include <stdio.h>
    int printme(double x) {
    printf("This is %g\n",x);
    return (int)2*x;
    Compiling this without -g, linking this with some hello world program and invoking the function from dbx gives
    (dbx) print ((int (*)(double))printme)(4.0)
    This is 4
    ((int (*)(double)) printme)(4) = &(noname)(double) at 0x8
    (dbx)
    The line "This is 4" clearly indicates that the function has been invoked correctly. Just the printed return value is meaningless. In this case, it is even possible to construct expressions with the return value:
    (dbx) print 5 + ((int (*)(double))printme)(4.0)
    This is 4
    5+((int (*)(double)) printme)(4) = 13
    i.e. dbx "knows" the correct return value 8. This does, however, apparently not work with return values of type double (i.e. in the original sqrt-Example).
    I have therefore submitted a bug report with bugs.sun.com; I will post the BugID when (and if) this has been accepted.

  • Adobe Advanced Search Function not woking

    The Advanced Search Function has stopped working. I use mac os x 10.6.8. I deleted and reinstalled adobe reader 10.1.2 and still the same problem: nothing appears when I click on the Advanced Search function. I'd welcome suggestions on how to fix this. Thank you.

    Did you try the shortcut for Advanced search - option + shift +F. Do you not get the search window even then ?

  • What advantage does HiQ provide over LabView Math Functions

    I'm evaluating how HiQ can help me to solve engineering modeling problems. I have used LabView to write several DAQ programs and a few programs to numerically solve modeling and simulation problems. What advantage are there to using HiQ compared to the math functions provided in LabView.

    There aren't really any advantages. There are some visualization options that are available in HiQ that would be very difficult in LabVIEW. HiQ is just another option to use, for a different type of interface and programming than is available in LabVIEW.
    Best Regards,
    Chris Matthews
    National Instruments

  • Math functions for dates

    Hello,
    Have you ever used a math function for dates (MMDDYYYY) not just a number? I'm looking to send an email out based on date field. For example, if someone's contract expires on 1/1/2016, I'd like to send them out emails 30, 152, 212 and 335 days before that date. Right now, we have fields set up for those 30, 152, 212 and 335 days and would like to know if there's a math function that would automatically fill them in dynamically based on their contract exp. date.
    Thanks for your help and suggestions.

    rmabrey wrote:
    I have the calculator working but I am having trouble figuring out thow to do a square root function, nth factorial, absolute value, and Fibonacci. java.lang.Math.sqrt()
    nothing for factorial - write your own.
    java.lang.Math.abs()
    nothing for Fibonacci - write your own.
    %

  • C99 math functions

    Hello all yet again,
    I'm trying to use the C99 math functions: nearbyint, round, exp2, cbrt, etc... But they don't seem to be defined in the CVI2013 header file.
    I previously would compile them (with gcc) only if __STDC_HOSTED__ was defined, but it appears that, although it doesn't appear in the predefined options listed in the build options, this macro is now defined in CVI2013...
    So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?
    Note, the official test seems to be:
    #if _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
    // C99 math functions present
    #endif
    Solved!
    Go to Solution.

    gdargaud wrote:
    So if CVI is now C99 compliant, where are those functions ? And if not, how do I know if they are present or not, short of doing #ifdef _CVI_ ?
    Nobody said so..., see here

  • TestStand math functions completely explained

    Is there a reference that has complete explanations to math functions used in TestStand?
    Many functions have options that are not explained under help.
    BenH

    Hi BenH,
    Just to make sure I am on the same page as you, are you referring to the Operators/Functions found in the expression browser or something within the API? Most of the math type functions within the expression browser have their operations and parameters explained within the Description box. I am not quite sure what other options you are seeing. Could you give some examples of some of the Math functions you have questions about and the options that are not defined?
    Regards,
    James W.
    Applications Engineer
    National Instruments

  • Math functions with error in/out

    Please refer to the attached picture. Where do you get these math functions with the error in/out? I saw these in responding to a post.
    Richard
    Solved!
    Go to Solution.
    Attachments:
    them_things.jpg ‏2 KB

    No wonder I've never seen it, I never use the waveform datatype. Thanks Lynn and Smerc.
    Richard

  • Math Functions in SAP

    What are the math functions in SAP?

    Hi,
    This is what u want may be
    Mathematical Functions
    ABAP contains a range of built-in functions that you can use as mathematical expressions, or as part of a mathematical expression:
    [COMPUTE] <n> = <func>( <m> ).
    The blanks between the parentheses and the argument <m> are obligatory. The result of calling the function <func> with the argument <m> is assigned to <n>.
    Functions for all Numeric Data Types
    The following built-in functions work with all three numeric data types (F, I, and P) as arguments.
    Functions for all numeric data types
    Function
    Result
    ABS
    Absolute value of argument.
    SIGN
    Sign of argument:                      1 X > 0
                                                  SIGN( X) = 0 if X = 0
                                                                   -1 X < 0
    CEIL
    Smallest integer value not smaller than the argument.
    FLOOR
    Largest integer value not larger than the argument.
    TRUNC
    Integer part of argument.
    FRAC
    Fraction part of argument.
    The argument of these functions does not have to be a numeric data type. If you choose another type, it is converted to a numeric type. For performance reasons, however, you should use the correct type whenever possible. The functions itself do not have a data type of their own. They do not change the numerical precision of a numerical operation.
    DATA N TYPE P DECIMALS 2.
    DATA M TYPE P DECIMALS 2 VALUE '-5.55'.
    N = ABS( M ).   WRITE:   'ABS:  ', N.
    N = SIGN( M ).  WRITE: / 'SIGN: ', N.
    N = CEIL( M ).  WRITE: / 'CEIL: ', N.
    N = FLOOR( M ). WRITE: / 'FLOOR:', N.
    N = TRUNC( M ). WRITE: / 'TRUNC:', N.
    N = FRAC( M ).  WRITE: / 'FRAC: ', N.
    The output appears as follows:
    ABS:              5.55
    SIGN:             1.00-
    CEIL:             5.00-
    FLOOR:            6.00-
    TRUNC:            5.00-
    FRAC:             0.55-
    DATA: T1(10),
    T2(10) VALUE '-100'.
    T1 = ABS( T2 ).
    WRITE T1.
    This produces the following output:
    100
    Two conversions are performed. First, the contents of field T2 (type C) are converted to type P. Then the system processes the ABS function using the results of the conversion. Then, during the assignment to the type C field T1, the result of the function is converted back to type C.
    Floating-Point Functions
    The following built-in functions work with floating point numbers (data type F) as an argument.
    Functions for floating point data types
    Function
    Meaning
    ACOS, ASIN, ATAN; COS, SIN, TAN
    Trigonometric functions.
    COSH, SINH, TANH
    Hyperbolic functions.
    EXP
    Exponential function with base e (e=2.7182818285).
    LOG
    Natural logarithm with base e.
    LOG10
    Logarithm with base 10.
    SQRT
    Square root.
    For all functions, the normal mathematical constraints apply (for example, square root is only possible for positive numbers). If you fail to observe them, a runtime error occurs.
    The argument of these functions does not have to be a floating point field. If you choose another type, it is converted to type F. The functions themselves have the data type F. This can change the numerical precision of a numerical operation.
    Regards

  • Math functions not sure how to work with them

    Im trying to work out the math functions into my program, but I'm not sure where is the mistake. This is what I have now:
    (a) y = ax^2 + bc + c
    (b) y = a*sin(x) + b*cos(x) + cx);Especially I'm not sure how to format the sin and cos functions
    Thanks !

    jordan755 wrote:
    Im trying to work out the math functions into my program, but I'm not sure where is the mistake. This is what I have now:
    (a) y = ax^2 + bc + c
    (b) y = a*sin(x) + b*cos(x) + cx);
    Java != algebra.
    (a) says: Take the variable called 'ax', perform a bitwise XOR on its value with the number 2, add that result to the value of the variable 'bc', add that result to the variable 'c' and put the result in variable 'y'.
    (b) is trying to call sin() and cos() methods defined in the current class and add the to variable cx.
    In your other thread, you had variable names 'keyboard' and 'character'. Given that, why would you expect 'bc' to mean "b times c" rather than "variable named 'bc'"? If you want multiplication, you have to use the multiply operator, ***.
    If you want to call a method that's defined outside your current class, you have to use the class name or a reference to an object of that class. The methods sin and cos are defined in the Math class. I advise you to read their docs before using them.

  • Advanced File Functions

    Hello all,
    I have a subVI that deletes 5 files which should always be present on my desktop due to a run before.  However, I have to put in a fail-safe that skips the delete process if the files are for some reason missing.
    Attached is the simple file path constant and Delete file directory process that I currently use.
    Is there any way I can utilize any of the other Advanced File Functions with a Case Structure and other Boolean Functions that can detect whether or not the files are there and then delete them if they are, or just skip the delete process if the files are not there.
    Thanks
    Attachments:
    Delete Files.vi ‏16 KB

    The Delete VI will skip the process on its own. The simplest thing to do is to call it and ignore the error (for example by using the Clear Errors VI). Just make sure not to wire an error into it if you do this, because you will then clear that error.
    As for some other tips regarding this VIs -
    Using constant paths is often a bad thing, especially if your are going to build the code into an executable and\or move it to another computer. Getting the path to the desktop is done in Windows through a special function which you can call by using the Call Library Function node, or you can hold the base path in a global.
    I suggest that unless absolutely necessary, you should not save your files to the desktop, but to another folder.
    You should create error in and out terminals, so that you can control when the VI runs.
    Giving it a less generic name is also a good idea, because LV can not hold 2 VIs with the same name in memory.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

Maybe you are looking for

  • Searching with different character sets

    Hello, we have a problem with Intermedia 8.1.6. running on Solaris. The table contains the text with different character sets and that's the problem. User submits the query in his char.set and the IM sometimes doesn't find the data. Idea is to create

  • HR Infotype : Viewing multiple entry at once?

    Hi everyone, I need to create a new infotype and in its screen, I want a grid or table control that displays every entry of this infotype for the current employee. My guess is to create the new infotype via txn PM01 and then modify the screen and the

  • Purchased OS X but it is not downloading on my machine.

    I purchased OS X from appstore The icon places itself on the dock But there is not progress with the download I have cancelled the download and went pack to appstore to install again, the programme is not downloaded Any advice?

  • Inpsire 5.1 Digital 5500 external Decoder won't turn back on

    Inpsire 5.1 Digital 5500 external Decoder won't turn back on? I bought a Creative Inpsire 5.1 Digital 5500 sound system form them back on febuary of 07. It has worked well for a about almost the last two years now. About three months ago though the e

  • ICM7.5 - System is shutting down with a error message

    Hi, I have installed a ICM7.5 SPRAWLER in our Lab.All was working fine until yesterday, when I suddenly started receiving the below error This system is shutting down. Please save all work in progress and log off. Any unsaved changes will be lost. Th