# Questions tagged [c]

C is a general purpose programming language. Originally intended for implementing system software, C and its close relatives are the principle languages used in most modern operating systems. Due to its thin layer of abstraction and low overhead, C allows efficient coding of algorithms and data structures useful for scientific computation. Use this tag for questions involving the C programming language.

111 questions
Filter by
Sorted by
Tagged with
117 views

146 views

### Numerical evaluation of the Exponential Integral Ei by rational Chebyshev approximations fails

I am trying to evaluate the Exponential Integral $Ei(x)=-\int^{\infty}_{-x}\frac{e^{-t}}{t}dt$ for $x>0$ (interpreted as the Cauchy principal value) by using rational Chebyshev approximations, ...
88 views

### Do BLAS routines compute their respective operations with minimum error?

Do all BLAS routines compute the respective operation with minimum error ? i.e. Is the reduction in sdot computed with least error ? I need to call these ...
129 views

### CHOLMOD implementation

I am working on a domain decomposition code in C that uses CHOLMOD to approximate grid values for a PDE in each sub-domain. The issue I have is that the methods use Matrix Market format, which is not ...
249 views

### Linear solve using CHLOMOD in C

I am using the open-source CHLOMOD (as here http://faculty.cse.tamu.edu/davis/suitesparse.html) in order to solve a linear system Ax=b (performing A/b=x) in my domain decomposition code but I am ...
186 views

### Open Source Linear Algebra Library

I am making a code in C that requires the equivalent of Matlab's '\' command for a linear system of the form AX=B where A is an NxN matrix and X, B are Nx1 vectors- i.e a code that performs X=A\B that ...
138 views

### Array initialization in C

In this bit of code, the X and Y arrays should be identical but for some reason, that I CANNOT figure out for the life of me, X is always 1 rather than 0. I have tried initializing the whole array ...
252 views

### Error in MD simulation with Lennard-Jones potential in C, resulting in a lack of conservation of energy

I'm working on a MD simulation using the Lennard-Jones potential and the Velocity Verlet algorithm. The code compiles and runs, but the energy for each time step is not conserved; it decreases ...
418 views

### Implementing velocity verlet for harmonic oscillator in C gives error wrt conservation of energy

I'm attempting to implement velocity Verlet with a harmonic oscillator in C, but I have some errors: Energy is not being conserved Energy oscillates much more than I would expect I believe the error ...
474 views

### Implementing std::nextafter: Should denormals-are-zero mode affect it? If so, how?

This might be the wrong stackexchange site for this question. math.SE, cs.SE, programmers.SE, and of course stackoverflow are all possibilities. I'm hoping to reach an audience that might actually ...