mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-07 06:33:39 +01:00
Fast 00
This commit is contained in:
parent
938e9c18fb
commit
c666878dcd
@ -2,6 +2,8 @@ let cutoff = 1.e-15
|
|||||||
|
|
||||||
(** Constants *)
|
(** Constants *)
|
||||||
let pi = acos (-1.)
|
let pi = acos (-1.)
|
||||||
|
let sq_pi = sqrt pi
|
||||||
|
let sq_pi_over_two = sq_pi *. 0.5
|
||||||
let pi_inv = 1. /. pi
|
let pi_inv = 1. /. pi
|
||||||
let two_over_sq_pi = 2. /. (sqrt pi)
|
let two_over_sq_pi = 2. /. (sqrt pi)
|
||||||
|
|
||||||
|
@ -7,6 +7,14 @@ let factmax = 150
|
|||||||
maxm : Maximum total angular momentum
|
maxm : Maximum total angular momentum
|
||||||
*)
|
*)
|
||||||
let boys_function ~maxm t =
|
let boys_function ~maxm t =
|
||||||
|
match maxm with
|
||||||
|
| 0 ->
|
||||||
|
begin
|
||||||
|
if t = 0. then [| 1. |] else
|
||||||
|
let sq_t = sqrt t in
|
||||||
|
[| (sq_pi_over_two /. sq_t) *. Gsl.Sf.erf sq_t |]
|
||||||
|
end
|
||||||
|
| _ ->
|
||||||
begin
|
begin
|
||||||
if t = 0. then
|
if t = 0. then
|
||||||
Array.init (maxm+1) (fun m -> 1. /. float_of_int (m+m+1))
|
Array.init (maxm+1) (fun m -> 1. /. float_of_int (m+m+1))
|
||||||
|
Loading…
Reference in New Issue
Block a user