View Full Version : Equivalent functions between libraries (Fortran / C#)

bpuli

08-26-2009, 01:46 AM

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.

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 (http://www.vni.com/products/imsl/documentation/fort06/math/NetHelp/default.htm?turl=zreal.htm) = Imsl.Math.ZeroFunction (http://www.vni.com/products/imsl/cSharp/v501/api/Imsl.Math.ZeroFunction.html) (zero finding using Muller's method)

SVRGN (http://www.vni.com/products/imsl/documentation/fort06/stat/NetHelp/default.htm?turl=svrgn.htm) = Imsl.Math.Sort.Ascending() (http://www.vni.com/products/imsl/cSharp/v501/api/Imsl.Stat.Sort.Ascending_overloads.html) (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".

Endrio

12-16-2014, 03:40 AM

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?

mecej4

11-24-2018, 01:58 AM

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!

Powered by vBulletin® Version 4.2.3 Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.