help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: firls.m, part 2


From: je suis
Subject: Re: firls.m, part 2
Date: Mon, 19 Jun 2017 16:54:41 +0000

> ​expint() is in C++17, so gcc7+ supports it:
>
> ​cat c_expint.cc
> #include <cmath>
> #include <iostream>
> int main()
> {
>     std::cout << "Ei(0) = " << std::expint(0) << '\n'
>               << "Ei(1) = " << std::expint(1) << '\n'
>               << "Gompetz constant = " << -std::exp(1)*std::expint(-1) <<
> '\n';
> }
>
> g++ -std=c++1z c_expint.cc
> ./a.out
> Ei(0) = -inf
> Ei(1) = 1.89512
> Gompetz constant = 0.596347
>
> Also there is a free implementation in e.g. GSL:
> https://github.com/ampl/gsl/blob/master/specfunc/expint.c

I didn't dare use (or see about) C++17 (but I am relatively new with
this). Thank you for letting me know of this.

Vlad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]