Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dff6a2f06a16
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: df57b9d9b0c1
Choose a head ref
  • 6 commits
  • 5 files changed
  • 1 contributor

Commits on Jul 7, 2019

  1. Copy the full SHA
    246142a View commit details
  2. Copy the full SHA
    6f2c364 View commit details
  3. Tests passing.

    pleroy committed Jul 7, 2019
    Copy the full SHA
    aeb4ae8 View commit details
  4. Comment.

    pleroy committed Jul 7, 2019
    Copy the full SHA
    e6caf72 View commit details
  5. Faster reduction.

    pleroy committed Jul 7, 2019
    Copy the full SHA
    bd7d4b2 View commit details
  6. Merge pull request #2238 from pleroy/ArgumentReduction

    Simple argument reduction for elliptic integrals
    pleroy authored Jul 7, 2019
    Copy the full SHA
    df57b9d View commit details
91 changes: 89 additions & 2 deletions mathematica/elliptic_integrals.wl
Original file line number Diff line number Diff line change
@@ -85,14 +85,58 @@
(*Join[randomargs2,randomvals2,2]];*)


(* ::Subsubsection:: *)
(*Argument reduction*)


(* ::Input:: *)
(*redm={1/10,1/2,9/10}*)


(* ::Input:: *)
(*red\[CurlyPhi]=Table[i/2,{i,-20,20}]*)


(* ::Input:: *)
(*redargs2=Flatten[Outer[List,red\[CurlyPhi],redm],1];*)


(* ::Input:: *)
(*redvals2=Map[*)
(*N[{*)
(*If[#[[2]]==0,*)
(*Limit[fukushimaB[#[[1]],m],m->0],*)
(*fukushimaB[#[[1]],#[[2]]]],*)
(*If[#[[2]]==0,*)
(*Limit[fukushimaD[#[[1]],m],m->0],*)
(*fukushimaD[#[[1]],#[[2]]]],*)
(*EllipticE[#[[1]],#[[2]]],*)
(*EllipticF[#[[1]],#[[2]]]*)
(*},20]&,*)
(*redargs2];*)


(* ::Input:: *)
(*redstrs2=Map[*)
(*"entry { argument: "<>decimalFloatLiteral[#[[1]],2]<>*)
(*" argument: "<>decimalFloatLiteral[#[[2]],2]<>*)
(*" value: "<>decimalFloatLiteral[#[[3]],2]<>*)
(*" value: "<>decimalFloatLiteral[#[[4]],2]<>*)
(*" value: "<>decimalFloatLiteral[#[[5]],2]<>*)
(*" value: "<>decimalFloatLiteral[#[[6]],2]<>*)
(*"}"*)
(*&,*)
(*Join[N[redargs2,20],redvals2,2]];*)


(* ::Input:: *)
(*SetDirectory[NotebookDirectory[]]*)


(* ::Input:: *)
(*Export[*)
(*"..\\numerics\\bivariate_elliptic_integrals.proto.txt",*)
(*StringRiffle[randomstrs2,"\n"],*)
(*StringRiffle[Flatten[{randomstrs2,redstrs2}],"\n"],*)
(*"text"]*)


@@ -188,14 +232,57 @@
(*Join[random1args3,random1vals3,2]];*)


(* ::Subsubsection:: *)
(*Argument reduction*)


(* ::Input:: *)
(*redm={1/10,1/2,9/10}*)


(* ::Input:: *)
(*red\[CurlyPhi]=Table[i/2,{i,-20,20}]*)


(* ::Input:: *)
(*redn={1/10,1/2,9/10}*)


(* ::Input:: *)
(*redargs3=Flatten[Outer[List,red\[CurlyPhi],redn,redm],2];*)


(* ::Input:: *)
(*redvals3=Map[*)
(*N[{*)
(*If[#[[2]]==0,*)
(*Limit[fukushimaJ[#[[1]],n,#[[3]]],n->0],*)
(*fukushimaJ[#[[1]],#[[2]],#[[3]]]],*)
(*EllipticPi[#[[2]],#[[1]],#[[3]]]*)
(*},20]&,*)
(*redargs3];*)


(* ::Input:: *)
(*redstrs3=Map[*)
(*"entry { argument: "<>decimalFloatLiteral[#[[1]],2]<>*)
(*" argument: "<>decimalFloatLiteral[#[[2]],2]<>*)
(*" argument: "<>decimalFloatLiteral[#[[3]],2]<>*)
(*" value: "<>decimalFloatLiteral[#[[4]],2]<>*)
(*" value: "<>decimalFloatLiteral[#[[5]],2]<>*)
(*"}"*)
(*&,*)
(*Join[N[redargs3,20],redvals3,2]];*)


(* ::Input:: *)
(*SetDirectory[NotebookDirectory[]]*)


(* ::Input:: *)
(*Export[*)
(*"..\\numerics\\trivariate_elliptic_integrals.proto.txt",*)
(*StringRiffle[Flatten[{randomstrs3,random1strs3}],"\n"],*)
(*StringRiffle[Flatten[{randomstrs3,random1strs3,redstrs3}],"\n"],*)
(*"text"]*)


Loading