cexp() function API has changed in C99

Bug #1426446 reported by Alex Valavanis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quantum wells, wires and dots
Fix Released
High
Alex Valavanis

Bug Description

Major issue found by Paul Harrison:

The old definition of the complex exponential in his old maths.h header was:

cexp(x):

   \exp(i \times x)

where x is a REAL number (G.r, in this case), while the C99 standard
defines it as:

cexp(z):

  \exp(z)

where z is a COMPLEX number.

Since we migrated to the new complex data type, this has broken the calculations in ppcd/ppsl and pplbso.

The solution is to change our function calls from:

cexp(x)

to

cexp(I*x)

Note though, that this will in turn be removed when we switch to using the std::complex<double> data type when the programs migrate to C++.

Changed in qwwad:
status: Triaged → Fix Committed
Changed in qwwad:
milestone: 1.91 → 1.3
tags: added: build pseudopotential
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Backported to lp:qwwad/1.2.x r338

Changed in qwwad:
milestone: 1.3 → 1.2.1
Changed in qwwad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.