Re: the accuracy of MPB

"Steven G. Johnson" <[email protected]>
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
On Nov 10, 2009, at 5:54 AM, ryanhao wrote:
>     the data generated by MPB or MEEP is mostly in float format,  
> which is only 6 numbers after the point. Eg:0.248182
>     but sometime, I need more accuracy in data, Eg: for Differential.
>     I have seen one of your explaination in the earlier email:
You can print out to double precision by just using a print statement  
in Scheme, e.g.

(print "the eigenfrequencies:" freqs "\n")

If you want to do computations with these numbers, you can also do  
them directly within your control file.  If you want to compute  
derivatives, it might be a good idea to use the (deriv ...) function  
provided by libctl, which uses Ridder's method to compute numerical  
derivatives accurately by Richardson extrapolation.

The HDF5 files are output in double precision by default as well.

Steven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.