;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;; @file      tst-dft.lisp
;; @author    Mitch Richling <https://www.mitchr.me>
;; @brief     Unit tests.@EOL
;; @std       Common Lisp
;; @see       use-dft.lisp
;; @copyright
;;  @parblock
;;  Copyright (c) 1996,1997,2008,2010,2015, Mitchell Jay Richling <https://www.mitchr.me> All rights reserved.
;;
;;  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
;;
;;  1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.
;;
;;  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation
;;     and/or other materials provided with the distribution.
;;
;;  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software
;;     without specific prior written permission.
;;
;;  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
;;  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
;;  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
;;  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
;;  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
;;  DAMAGE.
;;  @endparblock
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defpackage :MJR_DFT-TESTS (:USE :COMMON-LISP :LISP-UNIT :MJR_DFT :MJR_EPS :MJR_VVEC :MJR_MATT :MJR_ARR :MJR_PRNG))

(in-package :MJR_DFT-TESTS)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; octave> fft([1,2,3,4,5,6,8,7])
;; ans = 36.0000 +  0.0000i   -4.7071 +  9.9497i   -5.0000 +  3.0000i   -3.2929 -  0.0503i
;;       -2.0000 +  0.0000i   -3.2929 +  0.0503i   -5.0000 -  3.0000i   -4.7071 -  9.9497i
(defvar t1b #(1 2 3 4 5 6 8 7))
(defvar t1a #(36 #C(-4.7071 9.9497) #C(-5 3) #C(-3.2929 -0.0503) -2 #C(-3.2929 0.0503) #C(-5 -3) #C(-4.7071 -9.9497)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; octave> ifft([1,2,3,4,5,6,8,7])
;; ans = 4.50000 + 0.00000i  -0.58839 - 1.24372i  -0.62500 - 0.37500i  -0.41161 + 0.00628i
;;      -0.25000 + 0.00000i  -0.41161 - 0.00628i  -0.62500 + 0.37500i  -0.58839 + 1.24372i
(defvar t2a #(1 2 3 4 5 6 8 7))
(defvar t2b #(4.5 #C(-0.58839 -1.24372) #C(-0.62500 -0.37500) #C(-0.41161 0.00628) -0.25 #C(-0.41161 -0.00628) #C(-0.62500 0.37500) #C(-0.58839 1.24372)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; octave> fft2([1,2,3,4;5,6,8,7])
;; ans =  36 +  0i   -5 +  3i   -2 +  0i   -5 -  3i
;;       -16 +  0i    1 +  1i   -2 +  0i    1 -  1i
(defvar t3b #2a((1 2 3 4)
                (5 6 8 7)))
(defvar t3a #2a((   36    #C(-5 3)   -2   #C(-5 -3))
                (  -16    #C(1  1)   -2   #C(1  -1))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; octave> ifft2([1,2,3,4;5,6,8,7])
;; ans =  4.50000 + 0.00000i  -0.62500 - 0.37500i  -0.25000 + 0.00000i  -0.62500 + 0.37500i
;;       -2.00000 + 0.00000i   0.12500 - 0.12500i  -0.25000 + 0.00000i   0.12500 + 0.12500i
(defvar t4a #2a((1 2 3 4)
                (5 6 8 7)))
(defvar t4b #2a((4.50000   #C(-0.625 -0.375)  -0.25   #C(-0.62500 0.37500))
                (-2.00000  #C( 0.125 -0.125)  -0.25   #C( 0.12500 0.12500))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar t5b (mjr_vvec_to-vec '(:start 1 :end 1024)))
(defvar t5a #( #C(524800 0) #C(-512.0000000000015 166885.5300084231) #C(-512.0000000000006 83441.97960358398) #C(-512.0000000000003 55627.11373064458) #C(-512.0000000000017 41719.41898575164) #C(-512.000000000002 33374.59268655724) #C(-511.9999999999986 27811.20060429759) #C(-511.9999999999997 23837.19949694705) #C(-512 20856.56774250665) #C(-511.9999999999997 18538.18221676692) #C(-512.0000000000017 16683.36904441295) #C(-511.999999999998 15165.69939498128) #C(-511.9999999999989 13900.88738083825) #C(-511.9999999999987 12830.58123301455) #C(-512.000000000001 11913.10111596777) #C(-512.0000000000055 11117.88181643994) #C(-512 10421.99942399344) #C(-511.9999999999952 9807.923889004833) #C(-511.9999999999989 9262.02072799409) #C(-512.0000000000011 8773.525874639297) #C(-512.000000000001 8333.82807548693) #C(-512.0000000000011 7935.956315459201) #C(-511.9999999999992 7574.207036404837) #C(-512.0000000000001 7243.86860298443) #C(-512.0000000000001 6941.014652084443) #C(-512 6662.34703837184) #C(-512 6405.075023182262) #C(-511.9999999999994 6166.821310321929) #C(-511.9999999999995 5945.548217054846) #C(-511.9999999999997 5739.499120058155) #C(-512.0000000000005 5547.151612186425) #C(-512.0000000000003 5367.179725668635) #C(-512 5198.423238455736) #C(-511.9999999999998 5039.862561232268) #C(-511.9999999999994 4890.598056131817) #C(-512.0000000000002 4749.832900815513) #C(-512.0000000000007 4616.858808537464) #C(-511.9999999999998 4491.044063875224) #C(-511.9999999999995 4371.823447555462) #C(-511.9999999999998 4258.689711306431) #C(-511.9999999999998 4151.186331482577) #C(-512 4048.901323134308) #C(-512.0000000000005 3951.461937782085) #C(-511.9999999999997 3858.530101035979) #C(-512.0000000000001 3769.798472358013) #C(-511.9999999999998 3684.987030189521) #C(-512.0000000000006 3603.840102496667) #C(-512.0000000000018 3526.123776395263) #C(-512 3451.623631572474) #C(-511.9999999999982 3380.142751248719) #C(-511.9999999999995 3311.499971824143) #C(-512.0000000000003 3245.528338449022) #C(-512.0000000000001 3182.073738797588) #C(-512.0000000000002 3120.993691508952) #C(-511.9999999999995 3062.15626924571) #C(-511.9999999999997 3005.439139237053) #C(-511.9999999999997 2950.728706620831) #C(-512.0000000000002 2897.919347960118) #C(-512.0000000000003 2846.912724051191) #C(-511.9999999999995 2797.617162615405) #C(-512.0000000000006 2749.947102721909) #C(-511.9999999999997 2703.82259385728) #C(-511.9999999999989 2659.168843472296) #C(-511.9999999999997 2615.915807619498) #C(-512 2573.997819968434) #C(-511.9999999999998 2533.353255065727) #C(-512.000000000001 2493.924222207791) #C(-512.0000000000001 2455.656286727912) #C(-511.9999999999997 2418.498215875738) #C(-512 2382.401746794105) #C(-512.0000000000002 2347.321374383609) #C(-512 2313.214157094091) #C(-512.0000000000003 2280.039538900178) #C(-512.0000000000001 2247.75918590896) #C(-512.0000000000002 2216.336836215684) #C(-511.9999999999994 2185.738161771006) #C(-511.9999999999998 2155.930641153434) #C(-511.9999999999998 2126.883442255626) #C(-511.9999999999999 2098.567313994799) #C(-512.0000000000011 2070.954486247675) #C(-512 2044.018577290283) #C(-511.9999999999989 2017.734508094095) #C(-511.9999999999997 1992.078422893148) #C(-512.0000000000003 1967.027615493321) #C(-512 1942.56046084521) #C(-512.0000000000002 1918.656351447173) #C(-511.9999999999998 1895.295638185348) #C(-512.0000000000002 1872.459575253682) #C(-512.0000000000001 1850.130268829403) #C(-511.9999999999998 1828.290629208569) #C(-512.0000000000003 1806.924326132579) #C(-511.9999999999997 1786.015747060188) #C(-512.0000000000001 1765.549958160909) #C(-512.0000000000001 1745.512667824958) #C(-512.0000000000001 1725.890192502367) #C(-512.0000000000007 1706.669424699607) #C(-512 1687.83780297642) #C(-511.9999999999996 1669.383283798533) #C(-512.0000000000008 1651.294315113653) #C(-512.0000000000001 1633.559811528911) #C(-512.0000000000002 1616.169130977683) #C(-512 1599.112052772512) #C(-511.9999999999997 1582.378756949036) #C(-512.0000000000003 1565.959804813197) #C(-511.9999999999999 1549.846120610701) #C(-512 1534.028974243947) #C(-512.0000000000006 1518.499964967245) #C(-511.9999999999999 1503.251005996303) #C(-511.9999999999997 1488.274309972754) #C(-511.9999999999998 1473.562375228792) #C(-512 1459.107972801007) #C(-512.0000000000005 1444.904134146175) #C(-512 1430.944139515124) #C(-511.9999999999992 1417.221506943921) #C(-511.9999999999998 1403.729981824456) #C(-512.0000000000001 1390.463527019187) #C(-512.0000000000001 1377.416313487162) #C(-512.0000000000001 1364.582711390779) #C(-511.9999999999995 1351.957281654727) #C(-511.9999999999999 1339.534767950539) #C(-512.0000000000003 1327.310089081894) #C(-512.0000000000001 1315.278331747521) #C(-512.0000000000007 1303.434743660029) #C(-512.0000000000002 1291.774727000369) #C(-512.0000000000001 1280.293832189059) #C(-511.9999999999999 1268.987751956353) #C(-512 1257.852315694788) #C(-511.9999999999999 1246.883484078543) #C(-512 1236.077343935025) #C(-511.9999999999999 1225.430103354949) #C(-512 1214.938087028136) #C(-511.9999999999999 1204.597731792931) #C(-512 1194.405582387891) #C(-512.0000000000002 1184.358287395164) #C(-511.9999999999992 1174.452595365482) #C(-512.0000000000001 1164.685351115371) #C(-511.9999999999997 1155.053492187729) #C(-511.9999999999999 1145.554045467412) #C(-512.0000000000001 1136.184123943952) #C(-512.0000000000002 1126.940923614031) #C(-512.0000000000001 1117.821720516686) #C(-511.9999999999998 1108.823867894687) #C(-512.0000000000001 1099.944793475846) #C(-512.0000000000003 1091.181996868398) #C(-512 1082.533047064904) #C(-511.9999999999995 1073.99558004944) #C(-511.9999999999999 1065.567296503115) #C(-512 1057.245959603247) #C(-512.0000000000002 1049.029392911744) #C(-512 1040.915478348534) #C(-511.9999999999999 1032.902154246038) #C(-511.9999999999999 1024.987413480959) #C(-511.9999999999998 1017.169301679803) #C(-511.9999999999997 1009.44591549478) #C(-512.0000000000001 1001.815400946866) #C(-511.9999999999998 994.2759518330092) #C(-512 986.8258081945926) #C(-512.0000000000001 979.4632548444206) #C(-511.9999999999993 972.1866199496465) #C(-511.9999999999999 964.9942736681711) #C(-512 957.8846268361673) #C(-511.9999999999997 950.8561297045247) #C(-512 943.9072707220815) #C(-511.9999999999997 937.0365753636505) #C(-511.9999999999995 930.2426050009095) #C(-512.0000000000006 923.5239558143633) #C(-512.0000000000003 916.8792577446117) #C(-511.9999999999998 910.3071734813096) #C(-512 903.8063974882259) #C(-512.0000000000001 897.3756550629126) #C(-512.0000000000003 891.0137014295639) #C(-511.9999999999999 884.7193208637) #C(-511.9999999999997 878.49132584738) #C(-511.9999999999999 872.3285562537193) #C(-512.0000000000002 866.2298785595159) #C(-512.0000000000006 860.1941850848758) #C(-512 854.2203932587558) #C(-511.9999999999997 848.3074449093988) #C(-512 842.4543055786908) #C(-512.0000000000005 836.6599638594901) #C(-511.9999999999999 830.9234307550489) #C(-512.0000000000003 825.2437390596649) #C(-511.9999999999995 819.6199427597486) #C(-511.9999999999997 814.0511164545258) #C(-512.0000000000002 808.5363547956274) #C(-512.0000000000001 803.0747719448512) #C(-511.9999999999999 797.6655010494178) #C(-511.9999999999994 792.3076937340524) #C(-511.9999999999995 787.0005196092834) #C(-511.9999999999996 781.7431657953393) #C(-512.0000000000008 776.5348364610857) #C(-512.0000000000002 771.3747523774352) #C(-512 766.2621504847305) #C(-512.0000000000001 761.1962834735372) #C(-511.9999999999987 756.1764193784338) #C(-512.0000000000005 751.2018411842953) #C(-512.0000000000003 746.2718464445982) #C(-512.0000000000002 741.3857469113789) #C(-511.9999999999997 736.5428681763891) #C(-512.0000000000001 731.7425493230729) #C(-511.9999999999997 726.9841425889751) #C(-512 722.2670130382339) #C(-512.0000000000002 717.5905382437898) #C(-511.9999999999997 712.9541079789926) #C(-511.9999999999998 708.3571239182716) #C(-511.9999999999997 703.7989993465644) #C(-512.0000000000002 699.2791588772105) #C(-512.0000000000002 694.7970381780117) #C(-512 690.3520837052006) #C(-511.9999999999996 685.9437524450381) #C(-512 681.5715116627914) #C(-512.0000000000001 677.2348386588532) #C(-512.0000000000001 672.9332205317528) #C(-512.0000000000002 668.6661539478448) #C(-512 664.4331449174526) #C(-511.9999999999999 660.2337085772549) #C(-512 656.0673689787162) #C(-511.9999999999999 651.9336588823593) #C(-512.0000000000005 647.8321195577086) #C(-511.9999999999998 643.7623005886978) #C(-512.0000000000001 639.7237596843921) #C(-511.9999999999997 635.7160624948449) #C(-511.999999999999 631.7387824319213) #C(-511.9999999999999 627.7915004949509) #C(-512 623.8738051010439) #C(-512.0000000000003 619.9852919199195) #C(-512.0000000000007 616.1255637131321) #C(-511.9999999999998 612.2942301775392) #C(-512.0000000000001 608.4909077928788) #C(-512.0000000000001 604.7152196733423) #C(-511.9999999999998 600.966795423026) #C(-512 597.2452709951131) #C(-511.9999999999999 593.5502885547186) #C(-511.9999999999999 589.8814963452445) #C(-511.9999999999998 586.2385485581713) #C(-512.0000000000001 582.6211052061626) #C(-512.0000000000003 579.0288319993996) #C(-512.0000000000001 575.4614002250389) #C(-512.0000000000001 571.9184866297101) #C(-512.0000000000002 568.3997733049555) #C(-512 564.9049475755398) #C(-511.9999999999999 561.4337018905225) #C(-512.0000000000002 557.9857337170449) #C(-512.0000000000001 554.5607454367287) #C(-512 551.1584442446166) #C(-512 547.778542050587) #C(-511.9999999999995 544.4207553831776) #C(-512.0000000000001 541.0848052957289) #C(-511.9999999999995 537.7704172748082) #C(-511.9999999999999 534.4773211508275) #C(-511.9999999999995 531.2052510108105) #C(-512 527.953945113238) #C(-511.9999999999999 524.723145804915) #C(-512.0000000000002 521.5125994398247) #C(-512.0000000000002 518.3220562998551) #C(-511.9999999999999 515.1512705174487) #C(-512 512) #C(-511.9999999999999 508.8680063560482) #C(-512.0000000000002 505.755054823186) #C(-512.0000000000002 502.6609141976211) #C(-511.9999999999999 499.5853567653771) #C(-512 496.528158235041) #C(-512.0000000000005 493.489097672088) #C(-511.9999999999999 490.4679574346694) #C(-512.0000000000005 487.4645231108735) #C(-512.0000000000001 484.4785834574039) #C(-512.0000000000005 481.5099303396252) #C(-512 478.5583586729676) #C(-512 475.6236663656283) #C(-511.9999999999997 472.7056542625569) #C(-511.9999999999998 469.8041260906742) #C(-511.9999999999999 466.9188884053086) #C(-511.9999999999999 464.0497505378032) #C(-511.9999999999997 461.1965245442761) #C(-511.9999999999999 458.3590251554951) #C(-511.9999999999998 455.5370697278502) #C(-511.9999999999997 452.7304781953789) #C(-512 449.9390730228342) #C(-511.9999999999996 447.1626791597582) #C(-512.0000000000001 444.4011239955437) #C(-511.9999999999999 441.6542373154508) #C(-512 438.921851257563) #C(-512.0000000000001 436.2038002706529) #C(-512.0000000000001 433.4999210729403) #C(-511.9999999999998 430.8100526117142) #C(-511.9999999999997 428.1340360238073) #C(-512.0000000000005 425.471714596887) #C(-511.9999999999996 422.8229337315641) #C(-512 420.1875409042741) #C(-512.0000000000002 417.5653856309377) #C(-511.9999999999993 414.956319431362) #C(-512.0000000000001 412.3601957943694) #C(-511.9999999999997 409.7768701436522) #C(-511.9999999999997 407.2061998043048) #C(-511.9999999999998 404.6480439700529) #C(-512 402.1022636711318) #C(-511.9999999999998 399.5687217428193) #C(-511.9999999999999 397.0472827945987) #C(-511.9999999999999 394.5378131799369) #C(-511.9999999999999 392.0401809666694) #C(-511.9999999999999 389.5542559079684) #C(-511.9999999999999 387.0799094138909) #C(-512 384.6170145234827) #C(-512.0000000000002 382.1654458774366) #C(-512 379.725079691282) #C(-511.9999999999996 377.295793729099) #C(-512 374.8774672777444) #C(-511.9999999999998 372.4699811215771) #C(-512.0000000000001 370.0732175176729) #C(-511.9999999999999 367.6870601715141) #C(-512 365.311394213145) #C(-512.0000000000002 362.9461061737888) #C(-511.9999999999998 360.5910839629023) #C(-512.0000000000003 358.2462168456747) #C(-512.0000000000001 355.91139542094) #C(-511.9999999999997 353.5865115995211) #C(-512.0000000000003 351.2714585829697) #C(-511.9999999999998 348.9661308427055) #C(-511.9999999999989 346.6704240995487) #C(-511.9999999999998 344.3842353036283) #C(-512 342.107462614681) #C(-511.9999999999997 339.8400053826676) #C(-512.0000000000006 337.5817641287969) #C(-512.0000000000006 335.3326405268878) #C(-511.9999999999993 333.0925373850383) #C(-512.0000000000006 330.8613586276643) #C(-512.0000000000005 328.6390092778493) #C(-512.0000000000003 326.4253954400176) #C(-512.0000000000002 324.2204242829152) #C(-511.9999999999999 322.0240040229016) #C(-511.9999999999998 319.8360439075369) #C(-511.9999999999999 317.6564541994632) #C(-512.0000000000002 315.4851461605714) #C(-511.9999999999997 313.3220320364521) #C(-511.9999999999996 311.1670250411157) #C(-512.0000000000005 309.0200393419832) #C(-512 306.8809900451449) #C(-511.9999999999999 304.7497931808668) #C(-511.9999999999998 302.6263656893575) #C(-512 300.5106254067816) #C(-512 298.4024910515076) #C(-512.0000000000001 296.3018822106022) #C(-511.9999999999998 294.2087193265489) #C(-512 292.1229236841978) #C(-512 290.0444173979362) #C(-512 287.9731233990786) #C(-512.0000000000001 285.9089654234688) #C(-511.9999999999999 283.851867999289) #C(-511.9999999999999 281.8017564350791) #C(-511.9999999999999 279.7585568079513) #C(-511.9999999999997 277.7221959520047) #C(-512.0000000000014 275.6926014469295) #C(-512 273.6697016068054) #C(-511.9999999999985 271.6534254690753) #C(-512.0000000000003 269.6437027837079) #C(-512.0000000000003 267.640464002541) #C(-511.9999999999999 265.6436402687879) #C(-511.9999999999998 263.6531634067199) #C(-511.9999999999999 261.668965911519) #C(-512.0000000000003 259.6909809392907) #C(-511.9999999999998 257.7191422972385) #C(-512 255.7533844339934) #C(-512.0000000000001 253.7936424301009) #C(-511.9999999999998 251.8398519886601) #C(-511.9999999999998 249.891949426106) #C(-512 247.9498716631416) #C(-512.0000000000002 246.0135562158121) #C(-511.9999999999999 244.0829411867153) #C(-512 242.1579652563561) #C(-511.9999999999998 240.2385676746246) #C(-511.9999999999999 238.324688252417) #C(-512.0000000000002 236.4162673533806) #C(-512 234.5132458857842) #C(-512.0000000000001 232.6155652945144) #C(-511.9999999999996 230.7231675531944) #C(-512.0000000000001 228.8359951564218) #C(-512.0000000000002 226.9539911121225) #C(-511.9999999999999 225.0770989340218) #C(-512 223.2052626342253) #C(-512 221.3384267159146) #C(-511.9999999999997 219.4765361661449) #C(-511.9999999999999 217.6195364487549) #C(-512 215.7673734973847) #C(-512 213.9199937085805) #C(-512 212.0773439350247) #C(-512 210.2393714788283) #C(-512 208.4060240849536) #C(-511.9999999999999 206.5772499347317) #C(-511.9999999999997 204.7529976394421) #C(-512 202.933216234013) #C(-512.0000000000003 201.1178551707951) #C(-512 199.3068643134318) #C(-511.9999999999997 197.5001939308143) #C(-512.0000000000001 195.6977946911187) #C(-512.0000000000002 193.8996176559286) #C(-512.0000000000002 192.1056142744356) #C(-512 190.3157363777247) #C(-511.9999999999999 188.5299361731354) #C(-512.0000000000002 186.7481662386991) #C(-512 184.9703795176546) #C(-512 183.1965293130363) #C(-512.0000000000001 181.4265692823332) #C(-511.9999999999997 179.6604534322226) #C(-512.0000000000001 177.8981361133753) #C(-512.0000000000003 176.1395720153222) #C(-511.9999999999998 174.3847161613969) #C(-511.9999999999999 172.6335239037392) #C(-511.9999999999998 170.8859509183645) #C(-511.9999999999999 169.141953200299) #C(-512.0000000000001 167.4014870587758) #C(-512 165.664509112494) #C(-512.0000000000001 163.9309762849324) #C(-512.0000000000001 162.2008457997333) #C(-512.0000000000003 160.4740751761329) #C(-512 158.7506222244568) #C(-511.9999999999999 157.0304450416662) #C(-512 155.3135020069594) #C(-511.9999999999996 153.5997517774353) #C(-511.9999999999999 151.8891532838004) #C(-511.9999999999995 150.1816657261224) #C(-512.0000000000001 148.4772485696541) #C(-511.9999999999999 146.7758615406908) #C(-511.9999999999997 145.0774646224814) #C(-512.0000000000001 143.3820180511874) #C(-511.9999999999999 141.689482311892) #C(-512.0000000000001 139.99981813465) #C(-511.9999999999998 138.3129864905877) #C(-512.0000000000001 136.6289485880444) #C(-512.0000000000002 134.9476658687582) #C(-512.0000000000001 133.2691000040971) #C(-512.0000000000001 131.5932128913283) #C(-512.0000000000001 129.9199666499308) #C(-512 128.2493236179484) #C(-511.9999999999997 126.5812463483802) #C(-511.9999999999999 124.915697605614) #C(-512 123.2526403618942) #C(-512.0000000000001 121.592037793828) #C(-512.0000000000002 119.9338532789289) #C(-512 118.2780503921964) #C(-512.0000000000001 116.6245929027281) #C(-512.0000000000001 114.9734447703696) #C(-512.0000000000001 113.3245701423993) #C(-511.9999999999999 111.6779333502368) #C(-511.9999999999996 110.0334989062007) #C(-511.9999999999991 108.3912315002793) #C(-511.9999999999997 106.7510959969474) #C(-512.0000000000008 105.1130574320068) #C(-511.9999999999999 103.4770810094532) #C(-512 101.8431320983848) #C(-511.9999999999999 100.2111762299236) #C(-511.9999999999994 98.58117909417757) #C(-512.0000000000001 96.9531065372243) #C(-512.0000000000001 95.326924558123) #C(-512.0000000000001 93.70259930595) #C(-512.0000000000003 92.08009707686665) #C(-511.9999999999999 90.45938431120479) #C(-511.9999999999998 88.84042759058249) #C(-511.9999999999999 87.22319363503932) #C(-511.9999999999998 85.60764930020136) #C(-512.0000000000001 83.99376157446095) #C(-512.0000000000001 82.38149757618666) #C(-512.0000000000001 80.77082455094946) #C(-511.9999999999998 79.16170986877491) #C(-511.9999999999998 77.55412102141425) #C(-512 75.94802561963405) #C(-511.9999999999997 74.3433913905283) #C(-511.9999999999999 72.74018617485068) #C(-511.9999999999999 71.1383779243634) #C(-511.9999999999999 69.53793469920673) #C(-511.9999999999999 67.93882466528284) #C(-512.0000000000001 66.34101609166403) #C(-511.9999999999999 64.7444773480109) #C(-511.9999999999998 63.14917690201047) #C(-512 61.55508331683172) #C(-511.9999999999996 59.96216524859425) #C(-512.0000000000002 58.3703914438559) #C(-511.9999999999999 56.77973073710722) #C(-511.9999999999998 55.19015204829412) #C(-512.0000000000003 53.60162438033975) #C(-511.9999999999996 52.01411681669022) #C(-512 50.42759851886784) #C(-512.0000000000002 48.842038724042) #C(-511.9999999999997 47.25740674260679) #C(-511.9999999999999 45.67367195577567) #C(-512.0000000000001 44.09080381318545) #C(-511.9999999999997 42.50877183050984) #C(-512.0000000000001 40.92754558708627) #C(-511.9999999999998 39.34709472355302) #C(-512.0000000000001 37.76738893949415) #C(-511.9999999999998 36.18839799109545) #C(-512 34.61009168881002) #C(-512 33.03243989503103) #C(-511.9999999999999 31.45541252177613) #C(-511.9999999999998 29.87897952837409) #C(-512.0000000000003 28.30311091916237) #C(-511.9999999999999 26.7277767411994) #C(-512 25.1529470819678) #C(-511.9999999999999 23.57859206709441) #C(-511.9999999999999 22.00468185807949) #C(-512.0000000000002 20.43118665002294) #C(-511.9999999999999 18.8580766693608) #C(-511.9999999999999 17.28532217160705) #C(-511.9999999999998 15.7128934390978) #C(-512 14.14076077874051) #C(-512 12.56889451976895) #C(-511.9999999999999 10.99726501150371) #C(-512.0000000000002 9.42584262110131) #C(-512.0000000000002 7.854597731333342) #C(-511.9999999999999 6.283500738338262) #C(-511.9999999999995 4.712522049398103) #C(-512 3.141632080702038) #C(-511.9999999999998 1.570801255129481) #C(-512 0) #C(-511.9999999999998 -1.570801255129481) #C(-512 -3.141632080702038) #C(-511.9999999999995 -4.712522049398103) #C(-511.9999999999999 -6.283500738338262) #C(-512.0000000000002 -7.854597731333342) #C(-512.0000000000002 -9.42584262110131) #C(-511.9999999999999 -10.99726501150371) #C(-512 -12.56889451976895) #C(-512 -14.14076077874051) #C(-511.9999999999998 -15.7128934390978) #C(-511.9999999999999 -17.28532217160705) #C(-511.9999999999999 -18.8580766693608) #C(-512.0000000000002 -20.43118665002294) #C(-511.9999999999999 -22.00468185807949) #C(-511.9999999999999 -23.57859206709441) #C(-512 -25.1529470819678) #C(-511.9999999999999 -26.7277767411994) #C(-512.0000000000003 -28.30311091916237) #C(-511.9999999999998 -29.87897952837409) #C(-511.9999999999999 -31.45541252177613) #C(-512 -33.03243989503103) #C(-512 -34.61009168881002) #C(-511.9999999999998 -36.18839799109545) #C(-512.0000000000001 -37.76738893949415) #C(-511.9999999999998 -39.34709472355302) #C(-512.0000000000001 -40.92754558708627) #C(-511.9999999999997 -42.50877183050984) #C(-512.0000000000001 -44.09080381318545) #C(-511.9999999999999 -45.67367195577567) #C(-511.9999999999997 -47.25740674260679) #C(-512.0000000000002 -48.842038724042) #C(-512 -50.42759851886784) #C(-511.9999999999996 -52.01411681669022) #C(-512.0000000000003 -53.60162438033975) #C(-511.9999999999998 -55.19015204829412) #C(-511.9999999999999 -56.77973073710722) #C(-512.0000000000002 -58.3703914438559) #C(-511.9999999999996 -59.96216524859425) #C(-512 -61.55508331683172) #C(-511.9999999999998 -63.14917690201047) #C(-511.9999999999999 -64.7444773480109) #C(-512.0000000000001 -66.34101609166403) #C(-511.9999999999999 -67.93882466528284) #C(-511.9999999999999 -69.53793469920673) #C(-511.9999999999999 -71.1383779243634) #C(-511.9999999999999 -72.74018617485068) #C(-511.9999999999997 -74.3433913905283) #C(-512 -75.94802561963405) #C(-511.9999999999998 -77.55412102141425) #C(-511.9999999999998 -79.16170986877491) #C(-512.0000000000001 -80.77082455094946) #C(-512.0000000000001 -82.38149757618666) #C(-512.0000000000001 -83.99376157446095) #C(-511.9999999999998 -85.60764930020136) #C(-511.9999999999999 -87.22319363503932) #C(-511.9999999999998 -88.84042759058249) #C(-511.9999999999999 -90.45938431120479) #C(-512.0000000000003 -92.08009707686665) #C(-512.0000000000001 -93.70259930595) #C(-512.0000000000001 -95.326924558123) #C(-512.0000000000001 -96.9531065372243) #C(-511.9999999999994 -98.58117909417757) #C(-511.9999999999999 -100.2111762299236) #C(-512 -101.8431320983848) #C(-511.9999999999999 -103.4770810094532) #C(-512.0000000000008 -105.1130574320068) #C(-511.9999999999997 -106.7510959969474) #C(-511.9999999999991 -108.3912315002793) #C(-511.9999999999996 -110.0334989062007) #C(-511.9999999999999 -111.6779333502368) #C(-512.0000000000001 -113.3245701423993) #C(-512.0000000000001 -114.9734447703696) #C(-512.0000000000001 -116.6245929027281) #C(-512 -118.2780503921964) #C(-512.0000000000002 -119.9338532789289) #C(-512.0000000000001 -121.592037793828) #C(-512 -123.2526403618942) #C(-511.9999999999999 -124.915697605614) #C(-511.9999999999997 -126.5812463483802) #C(-512 -128.2493236179484) #C(-512.0000000000001 -129.9199666499308) #C(-512.0000000000001 -131.5932128913283) #C(-512.0000000000001 -133.2691000040971) #C(-512.0000000000002 -134.9476658687582) #C(-512.0000000000001 -136.6289485880444) #C(-511.9999999999998 -138.3129864905877) #C(-512.0000000000001 -139.99981813465) #C(-511.9999999999999 -141.689482311892) #C(-512.0000000000001 -143.3820180511874) #C(-511.9999999999997 -145.0774646224814) #C(-511.9999999999999 -146.7758615406908) #C(-512.0000000000001 -148.4772485696541) #C(-511.9999999999995 -150.1816657261224) #C(-511.9999999999999 -151.8891532838004) #C(-511.9999999999996 -153.5997517774353) #C(-512 -155.3135020069594) #C(-511.9999999999999 -157.0304450416662) #C(-512 -158.7506222244568) #C(-512.0000000000003 -160.4740751761329) #C(-512.0000000000001 -162.2008457997333) #C(-512.0000000000001 -163.9309762849324) #C(-512 -165.664509112494) #C(-512.0000000000001 -167.4014870587758) #C(-511.9999999999999 -169.141953200299) #C(-511.9999999999998 -170.8859509183645) #C(-511.9999999999999 -172.6335239037392) #C(-511.9999999999998 -174.3847161613969) #C(-512.0000000000003 -176.1395720153222) #C(-512.0000000000001 -177.8981361133753) #C(-511.9999999999997 -179.6604534322226) #C(-512.0000000000001 -181.4265692823332) #C(-512 -183.1965293130363) #C(-512 -184.9703795176546) #C(-512.0000000000002 -186.7481662386991) #C(-511.9999999999999 -188.5299361731354) #C(-512 -190.3157363777247) #C(-512.0000000000002 -192.1056142744356) #C(-512.0000000000002 -193.8996176559286) #C(-512.0000000000001 -195.6977946911187) #C(-511.9999999999997 -197.5001939308143) #C(-512 -199.3068643134318) #C(-512.0000000000003 -201.1178551707951) #C(-512 -202.933216234013) #C(-511.9999999999997 -204.7529976394421) #C(-511.9999999999999 -206.5772499347317) #C(-512 -208.4060240849536) #C(-512 -210.2393714788283) #C(-512 -212.0773439350247) #C(-512 -213.9199937085805) #C(-512 -215.7673734973847) #C(-511.9999999999999 -217.6195364487549) #C(-511.9999999999997 -219.4765361661449) #C(-512 -221.3384267159146) #C(-512 -223.2052626342253) #C(-511.9999999999999 -225.0770989340218) #C(-512.0000000000002 -226.9539911121225) #C(-512.0000000000001 -228.8359951564218) #C(-511.9999999999996 -230.7231675531944) #C(-512.0000000000001 -232.6155652945144) #C(-512 -234.5132458857842) #C(-512.0000000000002 -236.4162673533806) #C(-511.9999999999999 -238.324688252417) #C(-511.9999999999998 -240.2385676746246) #C(-512 -242.1579652563561) #C(-511.9999999999999 -244.0829411867153) #C(-512.0000000000002 -246.0135562158121) #C(-512 -247.9498716631416) #C(-511.9999999999998 -249.891949426106) #C(-511.9999999999998 -251.8398519886601) #C(-512.0000000000001 -253.7936424301009) #C(-512 -255.7533844339934) #C(-511.9999999999998 -257.7191422972385) #C(-512.0000000000003 -259.6909809392907) #C(-511.9999999999999 -261.668965911519) #C(-511.9999999999998 -263.6531634067199) #C(-511.9999999999999 -265.6436402687879) #C(-512.0000000000003 -267.640464002541) #C(-512.0000000000003 -269.6437027837079) #C(-511.9999999999985 -271.6534254690753) #C(-512 -273.6697016068054) #C(-512.0000000000014 -275.6926014469295) #C(-511.9999999999997 -277.7221959520047) #C(-511.9999999999999 -279.7585568079513) #C(-511.9999999999999 -281.8017564350791) #C(-511.9999999999999 -283.851867999289) #C(-512.0000000000001 -285.9089654234688) #C(-512 -287.9731233990786) #C(-512 -290.0444173979362) #C(-512 -292.1229236841978) #C(-511.9999999999998 -294.2087193265489) #C(-512.0000000000001 -296.3018822106022) #C(-512 -298.4024910515076) #C(-512 -300.5106254067816) #C(-511.9999999999998 -302.6263656893575) #C(-511.9999999999999 -304.7497931808668) #C(-512 -306.8809900451449) #C(-512.0000000000005 -309.0200393419832) #C(-511.9999999999996 -311.1670250411157) #C(-511.9999999999997 -313.3220320364521) #C(-512.0000000000002 -315.4851461605714) #C(-511.9999999999999 -317.6564541994632) #C(-511.9999999999998 -319.8360439075369) #C(-511.9999999999999 -322.0240040229016) #C(-512.0000000000002 -324.2204242829152) #C(-512.0000000000003 -326.4253954400176) #C(-512.0000000000005 -328.6390092778493) #C(-512.0000000000006 -330.8613586276643) #C(-511.9999999999993 -333.0925373850383) #C(-512.0000000000006 -335.3326405268878) #C(-512.0000000000006 -337.5817641287969) #C(-511.9999999999997 -339.8400053826676) #C(-512 -342.107462614681) #C(-511.9999999999998 -344.3842353036283) #C(-511.9999999999989 -346.6704240995487) #C(-511.9999999999998 -348.9661308427055) #C(-512.0000000000003 -351.2714585829697) #C(-511.9999999999997 -353.5865115995211) #C(-512.0000000000001 -355.91139542094) #C(-512.0000000000003 -358.2462168456747) #C(-511.9999999999998 -360.5910839629023) #C(-512.0000000000002 -362.9461061737888) #C(-512 -365.311394213145) #C(-511.9999999999999 -367.6870601715141) #C(-512.0000000000001 -370.0732175176729) #C(-511.9999999999998 -372.4699811215771) #C(-512 -374.8774672777444) #C(-511.9999999999996 -377.295793729099) #C(-512 -379.725079691282) #C(-512.0000000000002 -382.1654458774366) #C(-512 -384.6170145234827) #C(-511.9999999999999 -387.0799094138909) #C(-511.9999999999999 -389.5542559079684) #C(-511.9999999999999 -392.0401809666694) #C(-511.9999999999999 -394.5378131799369) #C(-511.9999999999999 -397.0472827945987) #C(-511.9999999999998 -399.5687217428193) #C(-512 -402.1022636711318) #C(-511.9999999999998 -404.6480439700529) #C(-511.9999999999997 -407.2061998043048) #C(-511.9999999999997 -409.7768701436522) #C(-512.0000000000001 -412.3601957943694) #C(-511.9999999999993 -414.956319431362) #C(-512.0000000000002 -417.5653856309377) #C(-512 -420.1875409042741) #C(-511.9999999999996 -422.8229337315641) #C(-512.0000000000005 -425.471714596887) #C(-511.9999999999997 -428.1340360238073) #C(-511.9999999999998 -430.8100526117142) #C(-512.0000000000001 -433.4999210729403) #C(-512.0000000000001 -436.2038002706529) #C(-512 -438.921851257563) #C(-511.9999999999999 -441.6542373154508) #C(-512.0000000000001 -444.4011239955437) #C(-511.9999999999996 -447.1626791597582) #C(-512 -449.9390730228342) #C(-511.9999999999997 -452.7304781953789) #C(-511.9999999999998 -455.5370697278502) #C(-511.9999999999999 -458.3590251554951) #C(-511.9999999999997 -461.1965245442761) #C(-511.9999999999999 -464.0497505378032) #C(-511.9999999999999 -466.9188884053086) #C(-511.9999999999998 -469.8041260906742) #C(-511.9999999999997 -472.7056542625569) #C(-512 -475.6236663656283) #C(-512 -478.5583586729676) #C(-512.0000000000005 -481.5099303396252) #C(-512.0000000000001 -484.4785834574039) #C(-512.0000000000005 -487.4645231108735) #C(-511.9999999999999 -490.4679574346694) #C(-512.0000000000005 -493.489097672088) #C(-512 -496.528158235041) #C(-511.9999999999999 -499.5853567653771) #C(-512.0000000000002 -502.6609141976211) #C(-512.0000000000002 -505.755054823186) #C(-511.9999999999999 -508.8680063560482) #C(-512 -512) #C(-511.9999999999999 -515.1512705174487) #C(-512.0000000000002 -518.3220562998551) #C(-512.0000000000002 -521.5125994398247) #C(-511.9999999999999 -524.723145804915) #C(-512 -527.953945113238) #C(-511.9999999999995 -531.2052510108105) #C(-511.9999999999999 -534.4773211508275) #C(-511.9999999999995 -537.7704172748082) #C(-512.0000000000001 -541.0848052957289) #C(-511.9999999999995 -544.4207553831776) #C(-512 -547.778542050587) #C(-512 -551.1584442446166) #C(-512.0000000000001 -554.5607454367287) #C(-512.0000000000002 -557.9857337170449) #C(-511.9999999999999 -561.4337018905225) #C(-512 -564.9049475755398) #C(-512.0000000000002 -568.3997733049555) #C(-512.0000000000001 -571.9184866297101) #C(-512.0000000000001 -575.4614002250389) #C(-512.0000000000003 -579.0288319993996) #C(-512.0000000000001 -582.6211052061626) #C(-511.9999999999998 -586.2385485581713) #C(-511.9999999999999 -589.8814963452445) #C(-511.9999999999999 -593.5502885547186) #C(-512 -597.2452709951131) #C(-511.9999999999998 -600.966795423026) #C(-512.0000000000001 -604.7152196733423) #C(-512.0000000000001 -608.4909077928788) #C(-511.9999999999998 -612.2942301775392) #C(-512.0000000000007 -616.1255637131321) #C(-512.0000000000003 -619.9852919199195) #C(-512 -623.8738051010439) #C(-511.9999999999999 -627.7915004949509) #C(-511.999999999999 -631.7387824319213) #C(-511.9999999999997 -635.7160624948449) #C(-512.0000000000001 -639.7237596843921) #C(-511.9999999999998 -643.7623005886978) #C(-512.0000000000005 -647.8321195577086) #C(-511.9999999999999 -651.9336588823593) #C(-512 -656.0673689787162) #C(-511.9999999999999 -660.2337085772549) #C(-512 -664.4331449174526) #C(-512.0000000000002 -668.6661539478448) #C(-512.0000000000001 -672.9332205317528) #C(-512.0000000000001 -677.2348386588532) #C(-512 -681.5715116627914) #C(-511.9999999999996 -685.9437524450381) #C(-512 -690.3520837052006) #C(-512.0000000000002 -694.7970381780117) #C(-512.0000000000002 -699.2791588772105) #C(-511.9999999999997 -703.7989993465644) #C(-511.9999999999998 -708.3571239182716) #C(-511.9999999999997 -712.9541079789926) #C(-512.0000000000002 -717.5905382437898) #C(-512 -722.2670130382339) #C(-511.9999999999997 -726.9841425889751) #C(-512.0000000000001 -731.7425493230729) #C(-511.9999999999997 -736.5428681763891) #C(-512.0000000000002 -741.3857469113789) #C(-512.0000000000003 -746.2718464445982) #C(-512.0000000000005 -751.2018411842953) #C(-511.9999999999987 -756.1764193784338) #C(-512.0000000000001 -761.1962834735372) #C(-512 -766.2621504847305) #C(-512.0000000000002 -771.3747523774352) #C(-512.0000000000008 -776.5348364610857) #C(-511.9999999999996 -781.7431657953393) #C(-511.9999999999995 -787.0005196092834) #C(-511.9999999999994 -792.3076937340524) #C(-511.9999999999999 -797.6655010494178) #C(-512.0000000000001 -803.0747719448512) #C(-512.0000000000002 -808.5363547956274) #C(-511.9999999999997 -814.0511164545258) #C(-511.9999999999995 -819.6199427597486) #C(-512.0000000000003 -825.2437390596649) #C(-511.9999999999999 -830.9234307550489) #C(-512.0000000000005 -836.6599638594901) #C(-512 -842.4543055786908) #C(-511.9999999999997 -848.3074449093988) #C(-512 -854.2203932587558) #C(-512.0000000000006 -860.1941850848758) #C(-512.0000000000002 -866.2298785595159) #C(-511.9999999999999 -872.3285562537193) #C(-511.9999999999997 -878.49132584738) #C(-511.9999999999999 -884.7193208637) #C(-512.0000000000003 -891.0137014295639) #C(-512.0000000000001 -897.3756550629126) #C(-512 -903.8063974882259) #C(-511.9999999999998 -910.3071734813096) #C(-512.0000000000003 -916.8792577446117) #C(-512.0000000000006 -923.5239558143633) #C(-511.9999999999995 -930.2426050009095) #C(-511.9999999999997 -937.0365753636505) #C(-512 -943.9072707220815) #C(-511.9999999999997 -950.8561297045247) #C(-512 -957.8846268361673) #C(-511.9999999999999 -964.9942736681711) #C(-511.9999999999993 -972.1866199496465) #C(-512.0000000000001 -979.4632548444206) #C(-512 -986.8258081945926) #C(-511.9999999999998 -994.2759518330092) #C(-512.0000000000001 -1001.815400946866) #C(-511.9999999999997 -1009.44591549478) #C(-511.9999999999998 -1017.169301679803) #C(-511.9999999999999 -1024.987413480959) #C(-511.9999999999999 -1032.902154246038) #C(-512 -1040.915478348534) #C(-512.0000000000002 -1049.029392911744) #C(-512 -1057.245959603247) #C(-511.9999999999999 -1065.567296503115) #C(-511.9999999999995 -1073.99558004944) #C(-512 -1082.533047064904) #C(-512.0000000000003 -1091.181996868398) #C(-512.0000000000001 -1099.944793475846) #C(-511.9999999999998 -1108.823867894687) #C(-512.0000000000001 -1117.821720516686) #C(-512.0000000000002 -1126.940923614031) #C(-512.0000000000001 -1136.184123943952) #C(-511.9999999999999 -1145.554045467412) #C(-511.9999999999997 -1155.053492187729) #C(-512.0000000000001 -1164.685351115371) #C(-511.9999999999992 -1174.452595365482) #C(-512.0000000000002 -1184.358287395164) #C(-512 -1194.405582387891) #C(-511.9999999999999 -1204.597731792931) #C(-512 -1214.938087028136) #C(-511.9999999999999 -1225.430103354949) #C(-512 -1236.077343935025) #C(-511.9999999999999 -1246.883484078543) #C(-512 -1257.852315694788) #C(-511.9999999999999 -1268.987751956353) #C(-512.0000000000001 -1280.293832189059) #C(-512.0000000000002 -1291.774727000369) #C(-512.0000000000007 -1303.434743660029) #C(-512.0000000000001 -1315.278331747521) #C(-512.0000000000003 -1327.310089081894) #C(-511.9999999999999 -1339.534767950539) #C(-511.9999999999995 -1351.957281654727) #C(-512.0000000000001 -1364.582711390779) #C(-512.0000000000001 -1377.416313487162) #C(-512.0000000000001 -1390.463527019187) #C(-511.9999999999998 -1403.729981824456) #C(-511.9999999999992 -1417.221506943921) #C(-512 -1430.944139515124) #C(-512.0000000000005 -1444.904134146175) #C(-512 -1459.107972801007) #C(-511.9999999999998 -1473.562375228792) #C(-511.9999999999997 -1488.274309972754) #C(-511.9999999999999 -1503.251005996303) #C(-512.0000000000006 -1518.499964967245) #C(-512 -1534.028974243947) #C(-511.9999999999999 -1549.846120610701) #C(-512.0000000000003 -1565.959804813197) #C(-511.9999999999997 -1582.378756949036) #C(-512 -1599.112052772512) #C(-512.0000000000002 -1616.169130977683) #C(-512.0000000000001 -1633.559811528911) #C(-512.0000000000008 -1651.294315113653) #C(-511.9999999999996 -1669.383283798533) #C(-512 -1687.83780297642) #C(-512.0000000000007 -1706.669424699607) #C(-512.0000000000001 -1725.890192502367) #C(-512.0000000000001 -1745.512667824958) #C(-512.0000000000001 -1765.549958160909) #C(-511.9999999999997 -1786.015747060188) #C(-512.0000000000003 -1806.924326132579) #C(-511.9999999999998 -1828.290629208569) #C(-512.0000000000001 -1850.130268829403) #C(-512.0000000000002 -1872.459575253682) #C(-511.9999999999998 -1895.295638185348) #C(-512.0000000000002 -1918.656351447173) #C(-512 -1942.56046084521) #C(-512.0000000000003 -1967.027615493321) #C(-511.9999999999997 -1992.078422893148) #C(-511.9999999999989 -2017.734508094095) #C(-512 -2044.018577290283) #C(-512.0000000000011 -2070.954486247675) #C(-511.9999999999999 -2098.567313994799) #C(-511.9999999999998 -2126.883442255626) #C(-511.9999999999998 -2155.930641153434) #C(-511.9999999999994 -2185.738161771006) #C(-512.0000000000002 -2216.336836215684) #C(-512.0000000000001 -2247.75918590896) #C(-512.0000000000003 -2280.039538900178) #C(-512 -2313.214157094091) #C(-512.0000000000002 -2347.321374383609) #C(-512 -2382.401746794105) #C(-511.9999999999997 -2418.498215875738) #C(-512.0000000000001 -2455.656286727912) #C(-512.000000000001 -2493.924222207791) #C(-511.9999999999998 -2533.353255065727) #C(-512 -2573.997819968434) #C(-511.9999999999997 -2615.915807619498) #C(-511.9999999999989 -2659.168843472296) #C(-511.9999999999997 -2703.82259385728) #C(-512.0000000000006 -2749.947102721909) #C(-511.9999999999995 -2797.617162615405) #C(-512.0000000000003 -2846.912724051191) #C(-512.0000000000002 -2897.919347960118) #C(-511.9999999999997 -2950.728706620831) #C(-511.9999999999997 -3005.439139237053) #C(-511.9999999999995 -3062.15626924571) #C(-512.0000000000002 -3120.993691508952) #C(-512.0000000000001 -3182.073738797588) #C(-512.0000000000003 -3245.528338449022) #C(-511.9999999999995 -3311.499971824143) #C(-511.9999999999982 -3380.142751248719) #C(-512 -3451.623631572474) #C(-512.0000000000018 -3526.123776395263) #C(-512.0000000000006 -3603.840102496667) #C(-511.9999999999998 -3684.987030189521) #C(-512.0000000000001 -3769.798472358013) #C(-511.9999999999997 -3858.530101035979) #C(-512.0000000000005 -3951.461937782085) #C(-512 -4048.901323134308) #C(-511.9999999999998 -4151.186331482577) #C(-511.9999999999998 -4258.689711306431) #C(-511.9999999999995 -4371.823447555462) #C(-511.9999999999998 -4491.044063875224) #C(-512.0000000000007 -4616.858808537464) #C(-512.0000000000002 -4749.832900815513) #C(-511.9999999999994 -4890.598056131817) #C(-511.9999999999998 -5039.862561232268) #C(-512 -5198.423238455736) #C(-512.0000000000003 -5367.179725668635) #C(-512.0000000000005 -5547.151612186425) #C(-511.9999999999997 -5739.499120058155) #C(-511.9999999999995 -5945.548217054846) #C(-511.9999999999994 -6166.821310321929) #C(-512 -6405.075023182262) #C(-512 -6662.34703837184) #C(-512.0000000000001 -6941.014652084443) #C(-512.0000000000001 -7243.86860298443) #C(-511.9999999999992 -7574.207036404837) #C(-512.0000000000011 -7935.956315459201) #C(-512.000000000001 -8333.82807548693) #C(-512.0000000000011 -8773.525874639297) #C(-511.9999999999989 -9262.02072799409) #C(-511.9999999999952 -9807.923889004833) #C(-512 -10421.99942399344) #C(-512.0000000000055 -11117.88181643994) #C(-512.000000000001 -11913.10111596777) #C(-511.9999999999987 -12830.58123301455) #C(-511.9999999999989 -13900.88738083825) #C(-511.999999999998 -15165.69939498128) #C(-512.0000000000017 -16683.36904441295) #C(-511.9999999999997 -18538.18221676692) #C(-512 -20856.56774250665) #C(-511.9999999999997 -23837.19949694705) #C(-511.9999999999986 -27811.20060429759) #C(-512.000000000002 -33374.59268655724) #C(-512.0000000000017 -41719.41898575164) #C(-512.0000000000003 -55627.11373064458) #C(-512.0000000000006 -83441.97960358398) #C(-512.0000000000015 -166885.5300084231)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun mjr_dft_dft-naive (x &optional (offset 0) (stride 1))
  ""
  (if (vectorp x)
      (let* ((mi   (array-dimension x 0))
             (mo   (ceiling (- mi offset) stride))
             (y    (make-array mo :initial-element 0)))
        (loop for io from 0
              for ii from offset upto (1- mi) by stride
              finally (return y)
              do (setf (aref y io)
                       (loop for ko from 0
                             for ki from offset upto (1- mi) by stride
                             sum (* (aref x ki) (exp (* #C(0 -2) pi ko io (/ mo))))))))
      (mjr_arr_cbind (mapcar #'mjr_dft_dft-naive
                            (mjr_arr_get-cols (mjr_arr_rbind (mapcar #'mjr_dft_dft-naive (mjr_arr_get-rows x))))))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-test mjr_dft_transform
  ;; We don't test this one because it will be tested when we test MJR_DFT_DFT and MJR_DFT_IDFT.
  1
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-test mjr_dft_dft
  ;; Hand picked test cases
  (assert-equality (mjr_eps_make-fixed= -0.1) t1a (mjr_dft_dft t1b))
  (assert-equality (mjr_eps_make-fixed= -0.1) t2a (mjr_dft_dft t2b))
  (assert-equality (mjr_eps_make-fixed= -0.1) t3a (mjr_dft_dft t3b))
  (assert-equality (mjr_eps_make-fixed= -0.1) t4a (mjr_dft_dft t4b))
  (assert-equality (mjr_eps_make-fixed= -0.1) t5a (mjr_dft_dft t5b))

  ;; Hand picked test cases for naive
  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive t1b) (mjr_dft_dft t1b))
  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive t2b) (mjr_dft_dft t2b))
  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive t3b) (mjr_dft_dft t3b))
  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive t4b) (mjr_dft_dft t4b))
  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive t5b) (mjr_dft_dft t5b))

  ;; Random vector tests
  (loop for i from 1 upto 50
        for m = (mjr_prng_int-cc 1 100)
        for x = (mjr_prng_vector m #'mjr_prng_float-cc -10.0 10.0)
        do  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive x) (mjr_dft_dft x)))

  ;; Random matrix tests
  (loop for i from 1 upto 50
        for m = (mjr_prng_int-cc 1 10)
        for n = (mjr_prng_int-cc 1 10)
        for x = (mjr_matt_make-test :mp-random :m m :n n :a -10.0 :b 10.0)
        do  (assert-equality (mjr_eps_make-fixed= -0.1) (mjr_dft_dft-naive x) (mjr_dft_dft x)))
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-test mjr_dft_idft
  ;; Hand picked test cases
  (assert-equality (mjr_eps_make-fixed= -0.1) t1b (mjr_dft_idft t1a))
  (assert-equality (mjr_eps_make-fixed= -0.1) t2b (mjr_dft_idft t2a))
  (assert-equality (mjr_eps_make-fixed= -0.1) t3b (mjr_dft_idft t3a))
  (assert-equality (mjr_eps_make-fixed= -0.1) t4b (mjr_dft_idft t4a))
  (assert-equality (mjr_eps_make-fixed= -0.1) t5b (mjr_dft_idft t5a))
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-test mjr_dft_dft-x-idft   ;; Make sure idft and dft undo each other
  ;;Random vector tests
  (loop for i from 1 upto 50
        for m   = (mjr_prng_int-cc 1 100)
        for x   = (mjr_prng_vector m #'mjr_prng_float-cc -10.0 10.0)
        for xd  = (mjr_dft_dft  x)
        for xi  = (mjr_dft_idft x)
        for xid = (mjr_dft_dft  xi)
        for xdi = (mjr_dft_idft xd)
        do  (assert-equality (mjr_eps_make-fixed= -0.1) x xid)
        do  (assert-equality (mjr_eps_make-fixed= -0.1) x xdi))
  ;; Random matrix tests
  (loop for i from 1 upto 50
        for m = (mjr_prng_int-cc 1 10)
        for n = (mjr_prng_int-cc 1 10)
        for x = (mjr_matt_make-test :mp-random :m m :n n :a -10.0 :b 10.0)
        for xd  = (mjr_dft_dft  x)
        for xi  = (mjr_dft_idft x)
        for xid = (mjr_dft_dft  xi)
        for xdi = (mjr_dft_idft xd)
        do  (assert-equality (mjr_eps_make-fixed= -0.1) x xid)
        do  (assert-equality (mjr_eps_make-fixed= -0.1) x xdi))
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-test mjr_dft_help
  ;; Note: This function dosen't need test cases..
  1
  )

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(run-tests)