Questions tagged [numerical-equations]

5 questions
11
votes
4 answers

Is OCaml any good for numerical analysis?

I'm currently using C and some FORTRAN to solve numerically systems of differential equations. I'm a bit fed up with both of these languages but I need to have some (rather) efficient code... I'm thinking of switching to OCaml. Is it worth it?
Eelvex
  • 323
  • 2
  • 11
4
votes
1 answer

Refactoring numerical code for TDD and encapsulation

I am coming to terms with TDD, and the fact that I need to re-factor some code that I'm (re)writing. I am having a problem that I think is a classic conflict---TDD vs. encapsulation of private methods/data---and I need advice on how to structure my…
Timtro
  • 167
  • 7
2
votes
1 answer

Pre-computation strategies when solving multiple linear equations with the same matrix?

Often in modeling, data processing, and optimization; the intensive portions of the code can often reduce to solving a lot of linear equations. e.g. solve for x1 in A x1 = b1 solve for x2 in A x2 = b2 ... and so on Sometimes the matrix 'A' doesn't…
J. Paulsen
  • 23
  • 4
1
vote
1 answer

How is this number calculated?

I have numbers; A == 0x20000000 B == 18 C == (B/10) D == 0x20000004 == (A + C) A and D are in hex, but I'm not sure what the assumed numeric bases of the others are (although I'd assume base 10 since they don't explicitly state a base. It may or…
Hamid
  • 145
  • 7
0
votes
1 answer

How to do scalar multiplication and matrix inverse when variables are of size 1000 bits?

I am doing arithmetic operations on really huge numbers. For example, I am given six variables, a_{11}, a_{12}, a_{21}, a_{22}, x_1, and x_2. Although the above are math terms, these six variables are each 1000-bit integers. What I want to do is to…
user4478
  • 101