1406 real*8,
dimension (:) :: x
1407 real*8 hto_li3(
size(x))
1410 real*8 xm,xm2,xtst,pr,pj,p2,pm,pr1,pj1,pm1,p12,pr2,pj2,p22,pm2,
1411 # rln2_x,iln2_x,tm2,y2r,ym2,ytst
1412 real*8,
dimension(0:14) :: bf
1413 real*8,
dimension(15) :: ct,sn,ct1,sn1,ct2,sn2
1414 real*8,
dimension(2) :: y,addx,ox,clnx,par,res,u1,u2,ln_y,omy,
1415 # ln_omy,addy,par1,par2,res1,res2,t,resa,resb,ln_t,res3,res4,
1416 # ln_omt,addt,addt2,omt,omu1,omu2
1417 real*8 :: b(0:14)=(/1.d0,-0.75d0,
1418 # 0.236111111111111111111111111111111d0,
1419 # -3.472222222222222222222222222222222d-2,
1420 # 6.481481481481481481481481481481482d-4,
1421 # 4.861111111111111111111111111111111d-4,
1422 # -2.393550012597631645250692869740488d-5,
1423 # -1.062925170068027210884353741496599d-5,
1424 # 7.794784580498866213151927437641723d-7,
1425 # 2.526087595532039976484420928865373d-7,
1426 # -2.359163915200471237027273583310139d-8,
1427 # -6.168132746415574698402981231264060d-9,
1428 # 6.824456748981078267312315451125495d-10,
1429 # 1.524285616929084572552216019859487d-10,
1430 # -1.916909414174054295837274763110831d-11/)
1432 FORALL (n=0:14) bf(n)= b(n)/(n+1.d0)
1434 xm2= x(1)*x(1)+x(2)*x(2)
1440 IF(xtst <= 1.d-20)
THEN
1443 ELSE IF(xm > 1.d-20)
THEN
1448 rln2_x= clnx(1)*clnx(1)
1449 iln2_x= clnx(2)*clnx(2)
1450 addx(1)= -clnx(1)*(
rz2+1.d0/6.d0*(rln2_x-3.d0*iln2_x))
1451 addx(2)= -clnx(2)*(
rz2+1.d0/6.d0*(3.d0*rln2_x-iln2_x))
1457 y2r= y(1)*y(1)-y(2)*y(2)
1458 IF(y(1) >= 0.d0.or.y2r < 0.d0)
THEN
1460 IF(ytst <= 1.d-20)
THEN
1465 par= hto_cqlnomx(y,omy)
1473 ct(n)= ct(1)*ct(n-1)-sn(1)*sn(n-1)
1474 sn(n)= sn(1)*ct(n-1)+ct(1)*sn(n-1)
1476 res(1)= pm*(bf(0)*ct(1)+pm*(bf(1)*ct(2)+pm*
1477 # (bf(2)*ct(3)+pm*(bf(3)*ct(4)+pm*
1478 # (bf(4)*ct(5)+pm*(bf(5)*ct(6)+pm*
1479 # (bf(6)*ct(7)+pm*(bf(7)*ct(8)+pm*
1480 # (bf(8)*ct(9)+pm*(bf(9)*ct(10)+pm*
1481 # (bf(10)*ct(11)+pm*(bf(11)*ct(12)+pm*
1482 # (bf(12)*ct(13)+pm*(bf(13)*ct(14)+pm*
1483 # (bf(14)*ct(15))))))))))))))))
1484 res(2)= pm*(bf(0)*sn(1)+pm*(bf(1)*sn(2)+pm*
1485 # (bf(2)*sn(3)+pm*(bf(3)*sn(4)+pm*
1486 # (bf(4)*sn(5)+pm*(bf(5)*sn(6)+pm*
1487 # (bf(6)*sn(7)+pm*(bf(7)*sn(8)+pm*
1488 # (bf(8)*sn(9)+pm*(bf(9)*sn(10)+pm*
1489 # (bf(10)*sn(11)+pm*(bf(11)*sn(12)+pm*
1490 # (bf(12)*sn(13)+pm*(bf(13)*sn(14)+pm*
1491 # (bf(14)*sn(15))))))))))))))))
1494 ELSE IF(ytst > 1.d-20)
THEN
1495 ym2= y(1)*y(1)+y(2)*y(2)
1496 u1(1)= 1.d0-y(1)/ym2
1501 ln_omy= hto_cqlnomx(y,omy)
1502 addy(1)=
rz3+
rz2*ln_y(1)+1.d0/6.d0*ln_y(1)*
1503 # (ln_y(1)*ln_y(1)-3.d0*ln_y(2)*ln_y(2))-
1504 # 0.5d0*ln_omy(1)*(ln_y(1)*ln_y(1)-ln_y(2)*
1505 # ln_y(2))+ln_y(1)*ln_y(2)*ln_omy(2)
1506 addy(2)=
rz2*ln_y(2)+1.d0/6.d0*ln_y(2)*(3.d0*
1507 # ln_y(1)*ln_y(1)-ln_y(2)*ln_y(2))-0.5d0*
1508 # ln_omy(2)*(ln_y(1)*ln_y(1)-ln_y(2)*ln_y(2))-
1509 # ln_y(1)*ln_omy(1)*ln_y(2)
1514 par1= hto_cqlnomx(u1,omu1)
1517 p12= pr1*pr1+pj1*pj1
1522 ct1(n)= ct1(1)*ct1(n-1)-sn1(1)*sn1(n-1)
1523 sn1(n)= sn1(1)*ct1(n-1)+ct1(1)*sn1(n-1)
1525 res1(1)= pm1*(bf(0)*ct1(1)+pm1*(bf(1)*ct1(2)+pm1*
1526 # (bf(2)*ct1(3)+pm1*(bf(3)*ct1(4)+pm1*
1527 # (bf(4)*ct1(5)+pm1*(bf(5)*ct1(6)+pm1*
1528 # (bf(6)*ct1(7)+pm1*(bf(7)*ct1(8)+pm1*
1529 # (bf(8)*ct1(9)+pm1*(bf(9)*ct1(10)+pm1*
1530 # (bf(10)*ct1(11)+pm1*(bf(11)*ct1(12)+pm1*
1531 # (bf(12)*ct1(13)+pm1*(bf(13)*ct1(14)+pm1*
1532 # (bf(14)*ct1(15))))))))))))))))
1533 res1(2)= pm1*(bf(0)*sn1(1)+pm1*(bf(1)*sn1(2)+pm1*
1534 # (bf(2)*sn1(3)+pm1*(bf(3)*sn1(4)+pm1*
1535 # (bf(4)*sn1(5)+pm1*(bf(5)*sn1(6)+pm1*
1536 # (bf(6)*sn1(7)+pm1*(bf(7)*sn1(8)+pm1*
1537 # (bf(8)*sn1(9)+pm1*(bf(9)*sn1(10)+pm1*
1538 # (bf(10)*sn1(11)+pm1*(bf(11)*sn1(12)+pm1*
1539 # (bf(12)*sn1(13)+pm1*(bf(13)*sn1(14)+pm1*
1540 # (bf(14)*sn1(15))))))))))))))))
1545 par2= hto_cqlnomx(u2,omu2)
1548 p22= pr2*pr2+pj2*pj2
1553 ct2(n)= ct2(1)*ct2(n-1)-sn2(1)*sn2(n-1)
1554 sn2(n)= sn2(1)*ct2(n-1)+ct2(1)*sn2(n-1)
1556 res2(1)= pm2*(bf(0)*ct2(1)+pm2*(bf(1)*ct2(2)+pm2*
1557 # (bf(2)*ct2(3)+pm2*(bf(3)*ct2(4)+pm2*
1558 # (bf(4)*ct2(5)+pm2*(bf(5)*ct2(6)+pm2*
1559 # (bf(6)*ct2(7)+pm2*(bf(7)*ct2(8)+pm2*
1560 # (bf(8)*ct2(9)+pm2*(bf(9)*ct2(10)+pm2*
1561 # (bf(10)*ct2(11)+pm2*(bf(11)*ct2(12)+pm2*
1562 # (bf(12)*ct2(13)+pm2*(bf(13)*ct2(14)+pm2*
1563 # (bf(14)*ct2(15))))))))))))))))
1564 res2(2)= pm2*(bf(0)*sn2(1)+pm2*(bf(1)*sn2(2)+pm2*
1565 # (bf(2)*sn2(3)+pm2*(bf(3)*sn2(4)+pm2*
1566 # (bf(4)*sn2(5)+pm2*(bf(5)*sn2(6)+pm2*
1567 # (bf(6)*sn2(7)+pm2*(bf(7)*sn2(8)+pm2*
1568 # (bf(8)*sn2(9)+pm2*(bf(9)*sn2(10)+pm2*
1569 # (bf(10)*sn2(11)+pm2*(bf(11)*sn2(12)+pm2*
1570 # (bf(12)*sn2(13)+pm2*(bf(13)*sn2(14)+pm2*
1571 # (bf(14)*sn2(15))))))))))))))))
1572 hto_li3= -res1-res2+addx+addy
1579 ELSE IF(y(1) < 0.d0)
THEN
1584 IF(t(1) <= 0.5d0)
THEN
1589 par= hto_cqlnomx(t,omt)
1597 ct(n)= ct(1)*ct(n-1)-sn(1)*sn(n-1)
1598 sn(n)= sn(1)*ct(n-1)+ct(1)*sn(n-1)
1600 resa(1)= pm*(bf(0)*ct(1)+pm*(bf(1)*ct(2)+pm*
1601 # (bf(2)*ct(3)+pm*(bf(3)*ct(4)+pm*
1602 # (bf(4)*ct(5)+pm*(bf(5)*ct(6)+pm*
1603 # (bf(6)*ct(7)+pm*(bf(7)*ct(8)+pm*
1604 # (bf(8)*ct(9)+pm*(bf(9)*ct(10)+pm*
1605 # (bf(10)*ct(11)+pm*(bf(11)*ct(12)+pm*
1606 # (bf(12)*ct(13)+pm*(bf(13)*ct(14)+pm*
1607 # (bf(14)*ct(15))))))))))))))))
1608 resa(2)= pm*(bf(0)*sn(1)+pm*(bf(1)*sn(2)+pm*
1609 # (bf(2)*sn(3)+pm*(bf(3)*sn(4)+pm*
1610 # (bf(4)*sn(5)+pm*(bf(5)*sn(6)+pm*
1611 # (bf(6)*sn(7)+pm*(bf(7)*sn(8)+pm*
1612 # (bf(8)*sn(9)+pm*(bf(9)*sn(10)+pm*
1613 # (bf(10)*sn(11)+pm*(bf(11)*sn(12)+pm*
1614 # (bf(12)*sn(13)+pm*(bf(13)*sn(14)+pm*
1615 # (bf(14)*sn(15))))))))))))))))
1616 ELSE IF(t(1) > 0.5d0)
THEN
1617 tm2= t(1)*t(1)+t(2)*t(2)
1618 u1(1)= 1.d0-t(1)/tm2
1623 ln_omt= hto_cqlnomx(t,omt)
1624 addt(1)=
rz3+
rz2*ln_t(1)+1.d0/6.d0*ln_t(1)*
1625 # (ln_t(1)*ln_t(1)-3.d0*ln_t(2)*ln_t(2))-
1626 # 0.5d0*ln_omt(1)*(ln_t(1)*ln_t(1)-ln_t(2)*
1627 # ln_t(2))+ln_t(1)*ln_t(2)*ln_omt(2)
1628 addt(2)=
rz2*ln_t(2)+1.d0/6.d0*ln_t(2)*(3.d0*
1629 # ln_t(1)*ln_t(1)-ln_t(2)*ln_t(2))-0.5d0*
1630 # ln_omt(2)*(ln_t(1)*ln_t(1)-ln_t(2)*ln_t(2))-
1631 # ln_t(1)*ln_omt(1)*ln_t(2)
1636 par1= hto_cqlnomx(u1,omu1)
1639 p12= pr1*pr1+pj1*pj1
1644 ct1(n)= ct1(1)*ct1(n-1)-sn1(1)*sn1(n-1)
1645 sn1(n)= sn1(1)*ct1(n-1)+ct1(1)*sn1(n-1)
1647 res1(1)= pm1*(bf(0)*ct1(1)+pm1*(bf(1)*ct1(2)+pm1*
1648 # (bf(2)*ct1(3)+pm1*(bf(3)*ct1(4)+pm1*
1649 # (bf(4)*ct1(5)+pm1*(bf(5)*ct1(6)+pm1*
1650 # (bf(6)*ct1(7)+pm1*(bf(7)*ct1(8)+pm1*
1651 # (bf(8)*ct1(9)+pm1*(bf(9)*ct1(10)+pm1*
1652 # (bf(10)*ct1(11)+pm1*(bf(11)*ct1(12)+pm1*
1653 # (bf(12)*ct1(13)+pm1*(bf(13)*ct1(14)+pm1*
1654 # (bf(14)*ct1(15))))))))))))))))
1655 res1(2)= pm1*(bf(0)*sn1(1)+pm1*(bf(1)*sn1(2)+pm1*
1656 # (bf(2)*sn1(3)+pm1*(bf(3)*sn1(4)+pm1*
1657 # (bf(4)*sn1(5)+pm1*(bf(5)*sn1(6)+pm1*
1658 # (bf(6)*sn1(7)+pm1*(bf(7)*sn1(8)+pm1*
1659 # (bf(8)*sn1(9)+pm1*(bf(9)*sn1(10)+pm1*
1660 # (bf(10)*sn1(11)+pm1*(bf(11)*sn1(12)+pm1*
1661 # (bf(12)*sn1(13)+pm1*(bf(13)*sn1(14)+pm1*
1662 # (bf(14)*sn1(15))))))))))))))))
1667 par2= hto_cqlnomx(u2,omu2)
1670 p22= pr2*pr2+pj2*pj2
1675 ct2(n)= ct2(1)*ct2(n-1)-sn2(1)*sn2(n-1)
1676 sn2(n)= sn2(1)*ct2(n-1)+ct2(1)*sn2(n-1)
1678 res2(1)= pm2*(bf(0)*ct2(1)+pm2*(bf(1)*ct2(2)+pm2*
1679 # (bf(2)*ct2(3)+pm2*(bf(3)*ct2(4)+pm2*
1680 # (bf(4)*ct2(5)+pm2*(bf(5)*ct2(6)+pm2*
1681 # (bf(6)*ct2(7)+pm2*(bf(7)*ct2(8)+pm2*
1682 # (bf(8)*ct2(9)+pm2*(bf(9)*ct2(10)+pm2*
1683 # (bf(10)*ct2(11)+pm2*(bf(11)*ct2(12)+pm2*
1684 # (bf(12)*ct2(13)+pm2*(bf(13)*ct2(14)+pm2*
1685 # (bf(14)*ct2(15))))))))))))))))
1686 res2(2)= pm2*(bf(0)*sn2(1)+pm2*(bf(1)*sn2(2)+pm2*
1687 # (bf(2)*sn2(3)+pm2*(bf(3)*sn2(4)+pm2*
1688 # (bf(4)*sn2(5)+pm2*(bf(5)*sn2(6)+pm2*
1689 # (bf(6)*sn2(7)+pm2*(bf(7)*sn2(8)+pm2*
1690 # (bf(8)*sn2(9)+pm2*(bf(9)*sn2(10)+pm2*
1691 # (bf(10)*sn2(11)+pm2*(bf(11)*sn2(12)+pm2*
1692 # (bf(12)*sn2(13)+pm2*(bf(13)*sn2(14)+pm2*
1693 # (bf(14)*sn2(15))))))))))))))))
1694 resa= -res1-res2+addt
1699 t(1)= y(1)*y(1)-y(2)*y(2)
1700 t(2)= 2.d0*y(1)*y(2)
1701 IF(t(1) <= 0.5d0)
THEN
1706 par= hto_cqlnomx(t,omt)
1714 ct(n)= ct(1)*ct(n-1)-sn(1)*sn(n-1)
1715 sn(n)= sn(1)*ct(n-1)+ct(1)*sn(n-1)
1717 resb(1)= pm*(bf(0)*ct(1)+pm*(bf(1)*ct(2)+pm*
1718 # (bf(2)*ct(3)+pm*(bf(3)*ct(4)+pm*
1719 # (bf(4)*ct(5)+pm*(bf(5)*ct(6)+pm*
1720 # (bf(6)*ct(7)+pm*(bf(7)*ct(8)+pm*
1721 # (bf(8)*ct(9)+pm*(bf(9)*ct(10)+pm*
1722 # (bf(10)*ct(11)+pm*(bf(11)*ct(12)+pm*
1723 # (bf(12)*ct(13)+pm*(bf(13)*ct(14)+pm*
1724 # (bf(14)*ct(15))))))))))))))))
1725 resb(2)= pm*(bf(0)*sn(1)+pm*(bf(1)*sn(2)+pm*
1726 # (bf(2)*sn(3)+pm*(bf(3)*sn(4)+pm*
1727 # (bf(4)*sn(5)+pm*(bf(5)*sn(6)+pm*
1728 # (bf(6)*sn(7)+pm*(bf(7)*sn(8)+pm*
1729 # (bf(8)*sn(9)+pm*(bf(9)*sn(10)+pm*
1730 # (bf(10)*sn(11)+pm*(bf(11)*sn(12)+pm*
1731 # (bf(12)*sn(13)+pm*(bf(13)*sn(14)+pm*
1732 # (bf(14)*sn(15))))))))))))))))
1733 ELSE IF(t(1) > 0.5d0)
THEN
1734 tm2= t(1)*t(1)+t(2)*t(2)
1735 u1(1)= 1.d0-t(1)/tm2
1740 ln_omt= hto_cqlnomx(t,omt)
1741 addt2(1)=
rz3+
rz2*ln_t(1)+1.d0/6.d0*ln_t(1)*
1742 # (ln_t(1)*ln_t(1)-3.d0*ln_t(2)*ln_t(2))-
1743 # 0.5d0*ln_omt(1)*(ln_t(1)*ln_t(1)-ln_t(2)*
1744 # ln_t(2))+ln_t(1)*ln_t(2)*ln_omt(2)
1745 addt2(2)=
rz2*ln_t(2)+1.d0/6.d0*ln_t(2)*(3.d0*
1746 # ln_t(1)*ln_t(1)-ln_t(2)*ln_t(2))-0.5d0*
1747 # ln_omt(2)*(ln_t(1)*ln_t(1)-ln_t(2)*ln_t(2))-
1748 # ln_t(1)*ln_omt(1)*ln_t(2)
1753 par1= hto_cqlnomx(u1,omu1)
1756 p12= pr1*pr1+pj1*pj1
1761 ct1(n)= ct1(1)*ct1(n-1)-sn1(1)*sn1(n-1)
1762 sn1(n)= sn1(1)*ct1(n-1)+ct1(1)*sn1(n-1)
1764 res3(1)= pm1*(bf(0)*ct1(1)+pm1*(bf(1)*ct1(2)+pm1*
1765 # (bf(2)*ct1(3)+pm1*(bf(3)*ct1(4)+pm1*
1766 # (bf(4)*ct1(5)+pm1*(bf(5)*ct1(6)+pm1*
1767 # (bf(6)*ct1(7)+pm1*(bf(7)*ct1(8)+pm1*
1768 # (bf(8)*ct1(9)+pm1*(bf(9)*ct1(10)+pm1*
1769 # (bf(10)*ct1(11)+pm1*(bf(11)*ct1(12)+pm1*
1770 # (bf(12)*ct1(13)+pm1*(bf(13)*ct1(14)+pm1*
1771 # (bf(14)*ct1(15))))))))))))))))
1772 res3(2)= pm1*(bf(0)*sn1(1)+pm1*(bf(1)*sn1(2)+pm1*
1773 # (bf(2)*sn1(3)+pm1*(bf(3)*sn1(4)+pm1*
1774 # (bf(4)*sn1(5)+pm1*(bf(5)*sn1(6)+pm1*
1775 # (bf(6)*sn1(7)+pm1*(bf(7)*sn1(8)+pm1*
1776 # (bf(8)*sn1(9)+pm1*(bf(9)*sn1(10)+pm1*
1777 # (bf(10)*sn1(11)+pm1*(bf(11)*sn1(12)+pm1*
1778 # (bf(12)*sn1(13)+pm1*(bf(13)*sn1(14)+pm1*
1779 # (bf(14)*sn1(15))))))))))))))))
1784 par2= hto_cqlnomx(u2,omu2)
1787 p22= pr2*pr2+pj2*pj2
1792 ct2(n)= ct2(1)*ct2(n-1)-sn2(1)*sn2(n-1)
1793 sn2(n)= sn2(1)*ct2(n-1)+ct2(1)*sn2(n-1)
1795 res4(1)= pm2*(bf(0)*ct2(1)+pm2*(bf(1)*ct2(2)+pm2*
1796 # (bf(2)*ct2(3)+pm2*(bf(3)*ct2(4)+pm2*
1797 # (bf(4)*ct2(5)+pm2*(bf(5)*ct2(6)+pm2*
1798 # (bf(6)*ct2(7)+pm2*(bf(7)*ct2(8)+pm2*
1799 # (bf(8)*ct2(9)+pm2*(bf(9)*ct2(10)+pm2*
1800 # (bf(10)*ct2(11)+pm2*(bf(11)*ct2(12)+pm2*
1801 # (bf(12)*ct2(13)+pm2*(bf(13)*ct2(14)+pm2*
1802 # (bf(14)*ct2(15))))))))))))))))
1803 res4(2)= pm2*(bf(0)*sn2(1)+pm2*(bf(1)*sn2(2)+pm2*
1804 # (bf(2)*sn2(3)+pm2*(bf(3)*sn2(4)+pm2*
1805 # (bf(4)*sn2(5)+pm2*(bf(5)*sn2(6)+pm2*
1806 # (bf(6)*sn2(7)+pm2*(bf(7)*sn2(8)+pm2*
1807 # (bf(8)*sn2(9)+pm2*(bf(9)*sn2(10)+pm2*
1808 # (bf(10)*sn2(11)+pm2*(bf(11)*sn2(12)+pm2*
1809 # (bf(12)*sn2(13)+pm2*(bf(13)*sn2(14)+pm2*
1810 # (bf(14)*sn2(15))))))))))))))))
1811 resb= -res3-res4+addt2
1813 hto_li3= -resa+0.25d0*resb+addx