Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 227473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:36:05+00:00 2026-05-11T19:36:05+00:00

Are there any serious scientific math libraries made with functional programming languages? From the

  • 0

Are there any serious scientific math libraries made with functional programming languages? From the very nature of functional languages one would think that they are particularly suitable for math, but yet the well-known algorithms seem to be procedural.

For instance, the classic Numerical Recipes series is written pretty much in procedural way. LAPACK is almost de facto standard in many fields, but it’s in Fortran and thus procedural or maybe OO, but definitely not functional.

Has anyone been able to transfer these kinds of well-known procedural algorithms to functional style?

Update: it seems to be so that functional languages are being used in symbolic calculations, e.g. in Mathematica. But, is there something inherently incompatible with numeric calculations and functional algorithms? Or is it just so that because imperative algorithms happened to be invented first, nobody has bothered to come up with functional equivalents?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:36:06+00:00Added an answer on May 11, 2026 at 7:36 pm

    There’s a Haskell library for numerical stuff in hackageDB: hmatrix. It draws from LAPACK, BLAS and GSL (GNU Scientific Library).

    But you should keep in mind that imperative algorithms can be readily transferred into purely-functional languages using monads (more specifically, state transformers). In fact, any efficient, in-place implementation must generally use such a mechanism to provide mutable variables in purely-functional languages.

    As for following a functional style, it isn’t possible in many cases. For many problems, there aren’t any (efficient) functional approaches known. Of course, you can get such algorithms to work in Haskell for example, but they won’t look much different than if they were written in Matlab, Fortran or C.

    EDIT:

    It’s both an apparent incompatibility, as well as an issue of which came first:

    1. Efficient numerical algorithms usually require mutable data. While this is possible in a purely-functional setting, it is not as straightforward as in imperative languages. But the two computational models are perfectly equivalent.
    2. The underlying machine (e.g. instruction set) has always been and still is imperative, with very few exceptions (!). Imperatively-coded algorithms are easier to analyze and optimize given the way the real machine is modeled.
    3. While the underlying mathematics allow relatively easy derivations for functional solutions, you won’t get an efficient algorithm (just as in the case of deriving imperative solutions directly from mathematics). Since most effort has been and still is directed towards imperative solutions, functional counterparts are simply unknown. By functional counterparts I mean code that properly expresses functional intent and style.
    4. There’s quite a lot of imperative code that can be reused. Much of it can be transcribed into a functional language using state transformers, though it would still look imperative.

    I actually think a purely-functional language like Haskell could be beneficial for coding algorithms: one could unify the mathematical description, the algorithm itself and some sort of type-oriented proof (i.e. using the Curry-Howard isomorphism) in the same chunk of code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You'll have to replace your callback parameter (currently cbfunc) in… May 12, 2026 at 12:45 am
  • Editorial Team
    Editorial Team added an answer Yes - you need a PHP FTP client library. May 12, 2026 at 12:45 am
  • Editorial Team
    Editorial Team added an answer If you have a given latitude and longitude you can… May 12, 2026 at 12:45 am

Related Questions

A researcher has created a small simulation in MATLAB and we want to make
I have to run a Web server with many services on an embedded server
I'm going to start a new project - rewriting an existing system (PHP +
I'm writing a small program to convert a standard definition 4:3 video to a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.