Skip to content

Instantly share code, notes, and snippets.

@joeydumont
Last active August 5, 2016 14:57
Show Gist options
  • Save joeydumont/10cd79819a8fa9fd5812e04a0aa0dd33 to your computer and use it in GitHub Desktop.
Save joeydumont/10cd79819a8fa9fd5812e04a0aa0dd33 to your computer and use it in GitHub Desktop.
Simple test of the precision of complex_bessel
#include <complex_bessel.h>
#include <iostream>
#include <iomanip>
int main(int argc, char* argv[])
{
std::cout << std::setprecision(20) << "complex_bessel: besselI(1,5) = " << sp_bessel::besselI(1,5) << std::endl;
std::cout << std::setprecision(20) << "besselI(1,5)[complex_bessel]- besselI(1,5)[matlab] = " << sp_bessel::besselI(1,5)-24.335642142450530 << std::endl;
std::cout << std::setprecision(20) << "besselI(1,5)[complex_bessel]-besselI(1,5)[WolframAlpha] = " << sp_bessel::besselI(1,5)-24.33564214245052719914305045176000846056487436829889815840 << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment