Results 1 to 4 of 4

Thread: Equivalent functions between libraries (Fortran / C#)

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    1

    Equivalent functions between libraries (Fortran / C#)

    I've just started working with the C# IMSL library and am attempting to convert some old compaq Fortran code with IMSL calls (these functions have same/similar names to the current Fortran IMSL library) to use the equivalents in the latest C# IMSL library.

    I haven't been able to find any documentation that lists equivalents between the Fortran and C# versions of the current libraries. I was wondering if such a list exists (and is available)? At this stage I only have 3 Fortran functions I need to convert. These are DZREAL, F and DSVRGN.

    Any help would be appreciated.

  2. #2
    Senior Member ed's Avatar
    Join Date
    Aug 2005
    Posts
    312
    The mapping between languages of the IMSL Library family isn't 1-to-1. With optional arguments or get/set methods, the functions map in a complex way and so an easy to use spreadsheet is quite a challenge. We are working on something along these lines to help migration however.

    For your specific routines, these are the mappings:

    ZREAL = Imsl.Math.ZeroFunction (zero finding using Muller's method)
    SVRGN = Imsl.Math.Sort.Ascending() (sorting real array, increasing)

    The IMSL C# Library supports only double precision, so the 'D' versions of these functions are what map. I read your list as "FSVRGN" and "DSVRGN" since there isn't a function called "F".


    The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.

  3. #3
    Banned
    Join Date
    Dec 2014
    Posts
    1
    How can I find random number for normal distribution other than N(0,1) , for example N(29,5.2)? Which function should I use and how?

  4. #4
    Senior Member mecej4's Avatar
    Join Date
    Dec 2009
    Posts
    127
    If x is from N(0,1) and y is from N(m,s), (x-0)/1 = (y-m)/s. Solve for y, obtaining y = s.x + m. No new function is needed!
    Last edited by mecej4; 01-05-2019 at 01:23 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •