/*  tnome.c    CCMATH mathematics library source code.
 *
 *  Copyright (C)  2000   Daniel A. Atkinson    All rights reserved.
 *  This code may be redistributed under the terms of the GNU library
 *  public license (LGPL). ( See the lgpl.license file for details.)
 * ------------------------------------------------------------------------
 */
/*
    Test:  nome
*/
#include "ccmath.h"
#include <math.h>
void main(void)
{ double q,k,a,u,up;
  double rad=1.74532925199433e-02;
  printf("     Test of Nome Function\n");
  printf(" angle    mod k      nome q       K           K1\n");
  for(a=5.; a<89. ;a+=5.){
    k=sin(rad*a);

/* elliptic nome function */
    q=nome(k,&u,&up);

    printf(" %5.2f  %8.6f  %10.8f %11.8f %11.8f\n",a,k,q,u,up);
   }
}
/*  Test output

     Test of Nome Function
 angle    mod k      nome q       K           K1
  5.00  0.087156  0.00047657  1.57379213  3.83174200
 10.00  0.173648  0.00191359  1.58284280  3.15338525
 15.00  0.258819  0.00433342  1.59814200  2.76806315
 20.00  0.342020  0.00777468  1.62002590  2.50455008
 25.00  0.422618  0.01229456  1.64899522  2.30878680
 30.00  0.500000  0.01797239  1.68575035  2.15651565
 35.00  0.573576  0.02491506  1.73124518  2.03471531
 40.00  0.642788  0.03326526  1.78676913  1.93558110
 45.00  0.707107  0.04321392  1.85407468  1.85407468
 50.00  0.766044  0.05501993  1.93558110  1.78676913
 55.00  0.819152  0.06904230  2.03471531  1.73124518
 60.00  0.866025  0.08579573  2.15651565  1.68575035
 65.00  0.906308  0.10605402  2.30878680  1.64899522
 70.00  0.939693  0.13106182  2.50455008  1.62002590
 75.00  0.965926  0.16303353  2.76806315  1.59814200
 80.00  0.984808  0.20660976  3.15338525  1.58284280
 85.00  0.996195  0.27517980  3.83174200  1.57379213
*/



syntax highlighted by Code2HTML, v. 0.9.1