6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00
firebird-qa/tests/bugs/core_0039_test.py

1087 lines
49 KiB
Python

#coding:utf-8
"""
ID: issue-363
ISSUE: 363
TITLE: Cannot create procedure with long chain of else-if clauses
DESCRIPTION:
JIRA: CORE-39
FBTEST: bugs.core_0039
"""
import pytest
from firebird.qa import *
db = db_factory()
test_script = """
-- Checked on FB 4.0.0 with length = 20'000.
-- Current length (1000) was choosen after discuss with dimitr.
-- Batch scenario for generating script with arbitrary number of if-else:
-- @echo off
-- setlocal enabledelayedexpansion enableextensions
--
-- set n=%1
-- if .%1.==.. set n=1000
--
-- set sql=%~n0.sql
-- del %sql% 2>nul
--
-- (
-- echo set heading off;
-- echo select 'Creating procedure. . .' from rdb$database;
-- echo set stat on;
-- ) >>%sql%
--
-- (
-- echo set term ^^;
-- echo create or alter procedure sp_ifel(N integer^)
-- echo returns (R double precision^)
-- echo as
-- echo begin
-- ) >> %sql%
--
-- set /a m=%n%-1
-- for /l %%i in (0,1,%m%) do (
-- if .%%i.==.0. (
-- echo if ( :n ^<= 0 ^) then r = %%i; >>%sql%
-- ) else (
-- echo else if (:n = %%i^) then r = sqrt(%%i^) ; >>%sql%
-- )
-- )
-- echo else r = sqrt(%n%^); >>%sql%
--
-- (
-- echo suspend;
-- echo end ^^
-- echo set term ;^^
-- echo set list on;
-- echo select * from sp_ifel(%n%^);
-- ) >>%sql%
set term ^;
create or alter procedure sp_ifel(N integer)
returns (R double precision)
as
begin
if ( :n <= 0 ) then r = 0;
else if (:n = 1) then r = sqrt(1) ;
else if (:n = 2) then r = sqrt(2) ;
else if (:n = 3) then r = sqrt(3) ;
else if (:n = 4) then r = sqrt(4) ;
else if (:n = 5) then r = sqrt(5) ;
else if (:n = 6) then r = sqrt(6) ;
else if (:n = 7) then r = sqrt(7) ;
else if (:n = 8) then r = sqrt(8) ;
else if (:n = 9) then r = sqrt(9) ;
else if (:n = 10) then r = sqrt(10) ;
else if (:n = 11) then r = sqrt(11) ;
else if (:n = 12) then r = sqrt(12) ;
else if (:n = 13) then r = sqrt(13) ;
else if (:n = 14) then r = sqrt(14) ;
else if (:n = 15) then r = sqrt(15) ;
else if (:n = 16) then r = sqrt(16) ;
else if (:n = 17) then r = sqrt(17) ;
else if (:n = 18) then r = sqrt(18) ;
else if (:n = 19) then r = sqrt(19) ;
else if (:n = 20) then r = sqrt(20) ;
else if (:n = 21) then r = sqrt(21) ;
else if (:n = 22) then r = sqrt(22) ;
else if (:n = 23) then r = sqrt(23) ;
else if (:n = 24) then r = sqrt(24) ;
else if (:n = 25) then r = sqrt(25) ;
else if (:n = 26) then r = sqrt(26) ;
else if (:n = 27) then r = sqrt(27) ;
else if (:n = 28) then r = sqrt(28) ;
else if (:n = 29) then r = sqrt(29) ;
else if (:n = 30) then r = sqrt(30) ;
else if (:n = 31) then r = sqrt(31) ;
else if (:n = 32) then r = sqrt(32) ;
else if (:n = 33) then r = sqrt(33) ;
else if (:n = 34) then r = sqrt(34) ;
else if (:n = 35) then r = sqrt(35) ;
else if (:n = 36) then r = sqrt(36) ;
else if (:n = 37) then r = sqrt(37) ;
else if (:n = 38) then r = sqrt(38) ;
else if (:n = 39) then r = sqrt(39) ;
else if (:n = 40) then r = sqrt(40) ;
else if (:n = 41) then r = sqrt(41) ;
else if (:n = 42) then r = sqrt(42) ;
else if (:n = 43) then r = sqrt(43) ;
else if (:n = 44) then r = sqrt(44) ;
else if (:n = 45) then r = sqrt(45) ;
else if (:n = 46) then r = sqrt(46) ;
else if (:n = 47) then r = sqrt(47) ;
else if (:n = 48) then r = sqrt(48) ;
else if (:n = 49) then r = sqrt(49) ;
else if (:n = 50) then r = sqrt(50) ;
else if (:n = 51) then r = sqrt(51) ;
else if (:n = 52) then r = sqrt(52) ;
else if (:n = 53) then r = sqrt(53) ;
else if (:n = 54) then r = sqrt(54) ;
else if (:n = 55) then r = sqrt(55) ;
else if (:n = 56) then r = sqrt(56) ;
else if (:n = 57) then r = sqrt(57) ;
else if (:n = 58) then r = sqrt(58) ;
else if (:n = 59) then r = sqrt(59) ;
else if (:n = 60) then r = sqrt(60) ;
else if (:n = 61) then r = sqrt(61) ;
else if (:n = 62) then r = sqrt(62) ;
else if (:n = 63) then r = sqrt(63) ;
else if (:n = 64) then r = sqrt(64) ;
else if (:n = 65) then r = sqrt(65) ;
else if (:n = 66) then r = sqrt(66) ;
else if (:n = 67) then r = sqrt(67) ;
else if (:n = 68) then r = sqrt(68) ;
else if (:n = 69) then r = sqrt(69) ;
else if (:n = 70) then r = sqrt(70) ;
else if (:n = 71) then r = sqrt(71) ;
else if (:n = 72) then r = sqrt(72) ;
else if (:n = 73) then r = sqrt(73) ;
else if (:n = 74) then r = sqrt(74) ;
else if (:n = 75) then r = sqrt(75) ;
else if (:n = 76) then r = sqrt(76) ;
else if (:n = 77) then r = sqrt(77) ;
else if (:n = 78) then r = sqrt(78) ;
else if (:n = 79) then r = sqrt(79) ;
else if (:n = 80) then r = sqrt(80) ;
else if (:n = 81) then r = sqrt(81) ;
else if (:n = 82) then r = sqrt(82) ;
else if (:n = 83) then r = sqrt(83) ;
else if (:n = 84) then r = sqrt(84) ;
else if (:n = 85) then r = sqrt(85) ;
else if (:n = 86) then r = sqrt(86) ;
else if (:n = 87) then r = sqrt(87) ;
else if (:n = 88) then r = sqrt(88) ;
else if (:n = 89) then r = sqrt(89) ;
else if (:n = 90) then r = sqrt(90) ;
else if (:n = 91) then r = sqrt(91) ;
else if (:n = 92) then r = sqrt(92) ;
else if (:n = 93) then r = sqrt(93) ;
else if (:n = 94) then r = sqrt(94) ;
else if (:n = 95) then r = sqrt(95) ;
else if (:n = 96) then r = sqrt(96) ;
else if (:n = 97) then r = sqrt(97) ;
else if (:n = 98) then r = sqrt(98) ;
else if (:n = 99) then r = sqrt(99) ;
else if (:n = 100) then r = sqrt(100) ;
else if (:n = 101) then r = sqrt(101) ;
else if (:n = 102) then r = sqrt(102) ;
else if (:n = 103) then r = sqrt(103) ;
else if (:n = 104) then r = sqrt(104) ;
else if (:n = 105) then r = sqrt(105) ;
else if (:n = 106) then r = sqrt(106) ;
else if (:n = 107) then r = sqrt(107) ;
else if (:n = 108) then r = sqrt(108) ;
else if (:n = 109) then r = sqrt(109) ;
else if (:n = 110) then r = sqrt(110) ;
else if (:n = 111) then r = sqrt(111) ;
else if (:n = 112) then r = sqrt(112) ;
else if (:n = 113) then r = sqrt(113) ;
else if (:n = 114) then r = sqrt(114) ;
else if (:n = 115) then r = sqrt(115) ;
else if (:n = 116) then r = sqrt(116) ;
else if (:n = 117) then r = sqrt(117) ;
else if (:n = 118) then r = sqrt(118) ;
else if (:n = 119) then r = sqrt(119) ;
else if (:n = 120) then r = sqrt(120) ;
else if (:n = 121) then r = sqrt(121) ;
else if (:n = 122) then r = sqrt(122) ;
else if (:n = 123) then r = sqrt(123) ;
else if (:n = 124) then r = sqrt(124) ;
else if (:n = 125) then r = sqrt(125) ;
else if (:n = 126) then r = sqrt(126) ;
else if (:n = 127) then r = sqrt(127) ;
else if (:n = 128) then r = sqrt(128) ;
else if (:n = 129) then r = sqrt(129) ;
else if (:n = 130) then r = sqrt(130) ;
else if (:n = 131) then r = sqrt(131) ;
else if (:n = 132) then r = sqrt(132) ;
else if (:n = 133) then r = sqrt(133) ;
else if (:n = 134) then r = sqrt(134) ;
else if (:n = 135) then r = sqrt(135) ;
else if (:n = 136) then r = sqrt(136) ;
else if (:n = 137) then r = sqrt(137) ;
else if (:n = 138) then r = sqrt(138) ;
else if (:n = 139) then r = sqrt(139) ;
else if (:n = 140) then r = sqrt(140) ;
else if (:n = 141) then r = sqrt(141) ;
else if (:n = 142) then r = sqrt(142) ;
else if (:n = 143) then r = sqrt(143) ;
else if (:n = 144) then r = sqrt(144) ;
else if (:n = 145) then r = sqrt(145) ;
else if (:n = 146) then r = sqrt(146) ;
else if (:n = 147) then r = sqrt(147) ;
else if (:n = 148) then r = sqrt(148) ;
else if (:n = 149) then r = sqrt(149) ;
else if (:n = 150) then r = sqrt(150) ;
else if (:n = 151) then r = sqrt(151) ;
else if (:n = 152) then r = sqrt(152) ;
else if (:n = 153) then r = sqrt(153) ;
else if (:n = 154) then r = sqrt(154) ;
else if (:n = 155) then r = sqrt(155) ;
else if (:n = 156) then r = sqrt(156) ;
else if (:n = 157) then r = sqrt(157) ;
else if (:n = 158) then r = sqrt(158) ;
else if (:n = 159) then r = sqrt(159) ;
else if (:n = 160) then r = sqrt(160) ;
else if (:n = 161) then r = sqrt(161) ;
else if (:n = 162) then r = sqrt(162) ;
else if (:n = 163) then r = sqrt(163) ;
else if (:n = 164) then r = sqrt(164) ;
else if (:n = 165) then r = sqrt(165) ;
else if (:n = 166) then r = sqrt(166) ;
else if (:n = 167) then r = sqrt(167) ;
else if (:n = 168) then r = sqrt(168) ;
else if (:n = 169) then r = sqrt(169) ;
else if (:n = 170) then r = sqrt(170) ;
else if (:n = 171) then r = sqrt(171) ;
else if (:n = 172) then r = sqrt(172) ;
else if (:n = 173) then r = sqrt(173) ;
else if (:n = 174) then r = sqrt(174) ;
else if (:n = 175) then r = sqrt(175) ;
else if (:n = 176) then r = sqrt(176) ;
else if (:n = 177) then r = sqrt(177) ;
else if (:n = 178) then r = sqrt(178) ;
else if (:n = 179) then r = sqrt(179) ;
else if (:n = 180) then r = sqrt(180) ;
else if (:n = 181) then r = sqrt(181) ;
else if (:n = 182) then r = sqrt(182) ;
else if (:n = 183) then r = sqrt(183) ;
else if (:n = 184) then r = sqrt(184) ;
else if (:n = 185) then r = sqrt(185) ;
else if (:n = 186) then r = sqrt(186) ;
else if (:n = 187) then r = sqrt(187) ;
else if (:n = 188) then r = sqrt(188) ;
else if (:n = 189) then r = sqrt(189) ;
else if (:n = 190) then r = sqrt(190) ;
else if (:n = 191) then r = sqrt(191) ;
else if (:n = 192) then r = sqrt(192) ;
else if (:n = 193) then r = sqrt(193) ;
else if (:n = 194) then r = sqrt(194) ;
else if (:n = 195) then r = sqrt(195) ;
else if (:n = 196) then r = sqrt(196) ;
else if (:n = 197) then r = sqrt(197) ;
else if (:n = 198) then r = sqrt(198) ;
else if (:n = 199) then r = sqrt(199) ;
else if (:n = 200) then r = sqrt(200) ;
else if (:n = 201) then r = sqrt(201) ;
else if (:n = 202) then r = sqrt(202) ;
else if (:n = 203) then r = sqrt(203) ;
else if (:n = 204) then r = sqrt(204) ;
else if (:n = 205) then r = sqrt(205) ;
else if (:n = 206) then r = sqrt(206) ;
else if (:n = 207) then r = sqrt(207) ;
else if (:n = 208) then r = sqrt(208) ;
else if (:n = 209) then r = sqrt(209) ;
else if (:n = 210) then r = sqrt(210) ;
else if (:n = 211) then r = sqrt(211) ;
else if (:n = 212) then r = sqrt(212) ;
else if (:n = 213) then r = sqrt(213) ;
else if (:n = 214) then r = sqrt(214) ;
else if (:n = 215) then r = sqrt(215) ;
else if (:n = 216) then r = sqrt(216) ;
else if (:n = 217) then r = sqrt(217) ;
else if (:n = 218) then r = sqrt(218) ;
else if (:n = 219) then r = sqrt(219) ;
else if (:n = 220) then r = sqrt(220) ;
else if (:n = 221) then r = sqrt(221) ;
else if (:n = 222) then r = sqrt(222) ;
else if (:n = 223) then r = sqrt(223) ;
else if (:n = 224) then r = sqrt(224) ;
else if (:n = 225) then r = sqrt(225) ;
else if (:n = 226) then r = sqrt(226) ;
else if (:n = 227) then r = sqrt(227) ;
else if (:n = 228) then r = sqrt(228) ;
else if (:n = 229) then r = sqrt(229) ;
else if (:n = 230) then r = sqrt(230) ;
else if (:n = 231) then r = sqrt(231) ;
else if (:n = 232) then r = sqrt(232) ;
else if (:n = 233) then r = sqrt(233) ;
else if (:n = 234) then r = sqrt(234) ;
else if (:n = 235) then r = sqrt(235) ;
else if (:n = 236) then r = sqrt(236) ;
else if (:n = 237) then r = sqrt(237) ;
else if (:n = 238) then r = sqrt(238) ;
else if (:n = 239) then r = sqrt(239) ;
else if (:n = 240) then r = sqrt(240) ;
else if (:n = 241) then r = sqrt(241) ;
else if (:n = 242) then r = sqrt(242) ;
else if (:n = 243) then r = sqrt(243) ;
else if (:n = 244) then r = sqrt(244) ;
else if (:n = 245) then r = sqrt(245) ;
else if (:n = 246) then r = sqrt(246) ;
else if (:n = 247) then r = sqrt(247) ;
else if (:n = 248) then r = sqrt(248) ;
else if (:n = 249) then r = sqrt(249) ;
else if (:n = 250) then r = sqrt(250) ;
else if (:n = 251) then r = sqrt(251) ;
else if (:n = 252) then r = sqrt(252) ;
else if (:n = 253) then r = sqrt(253) ;
else if (:n = 254) then r = sqrt(254) ;
else if (:n = 255) then r = sqrt(255) ;
else if (:n = 256) then r = sqrt(256) ;
else if (:n = 257) then r = sqrt(257) ;
else if (:n = 258) then r = sqrt(258) ;
else if (:n = 259) then r = sqrt(259) ;
else if (:n = 260) then r = sqrt(260) ;
else if (:n = 261) then r = sqrt(261) ;
else if (:n = 262) then r = sqrt(262) ;
else if (:n = 263) then r = sqrt(263) ;
else if (:n = 264) then r = sqrt(264) ;
else if (:n = 265) then r = sqrt(265) ;
else if (:n = 266) then r = sqrt(266) ;
else if (:n = 267) then r = sqrt(267) ;
else if (:n = 268) then r = sqrt(268) ;
else if (:n = 269) then r = sqrt(269) ;
else if (:n = 270) then r = sqrt(270) ;
else if (:n = 271) then r = sqrt(271) ;
else if (:n = 272) then r = sqrt(272) ;
else if (:n = 273) then r = sqrt(273) ;
else if (:n = 274) then r = sqrt(274) ;
else if (:n = 275) then r = sqrt(275) ;
else if (:n = 276) then r = sqrt(276) ;
else if (:n = 277) then r = sqrt(277) ;
else if (:n = 278) then r = sqrt(278) ;
else if (:n = 279) then r = sqrt(279) ;
else if (:n = 280) then r = sqrt(280) ;
else if (:n = 281) then r = sqrt(281) ;
else if (:n = 282) then r = sqrt(282) ;
else if (:n = 283) then r = sqrt(283) ;
else if (:n = 284) then r = sqrt(284) ;
else if (:n = 285) then r = sqrt(285) ;
else if (:n = 286) then r = sqrt(286) ;
else if (:n = 287) then r = sqrt(287) ;
else if (:n = 288) then r = sqrt(288) ;
else if (:n = 289) then r = sqrt(289) ;
else if (:n = 290) then r = sqrt(290) ;
else if (:n = 291) then r = sqrt(291) ;
else if (:n = 292) then r = sqrt(292) ;
else if (:n = 293) then r = sqrt(293) ;
else if (:n = 294) then r = sqrt(294) ;
else if (:n = 295) then r = sqrt(295) ;
else if (:n = 296) then r = sqrt(296) ;
else if (:n = 297) then r = sqrt(297) ;
else if (:n = 298) then r = sqrt(298) ;
else if (:n = 299) then r = sqrt(299) ;
else if (:n = 300) then r = sqrt(300) ;
else if (:n = 301) then r = sqrt(301) ;
else if (:n = 302) then r = sqrt(302) ;
else if (:n = 303) then r = sqrt(303) ;
else if (:n = 304) then r = sqrt(304) ;
else if (:n = 305) then r = sqrt(305) ;
else if (:n = 306) then r = sqrt(306) ;
else if (:n = 307) then r = sqrt(307) ;
else if (:n = 308) then r = sqrt(308) ;
else if (:n = 309) then r = sqrt(309) ;
else if (:n = 310) then r = sqrt(310) ;
else if (:n = 311) then r = sqrt(311) ;
else if (:n = 312) then r = sqrt(312) ;
else if (:n = 313) then r = sqrt(313) ;
else if (:n = 314) then r = sqrt(314) ;
else if (:n = 315) then r = sqrt(315) ;
else if (:n = 316) then r = sqrt(316) ;
else if (:n = 317) then r = sqrt(317) ;
else if (:n = 318) then r = sqrt(318) ;
else if (:n = 319) then r = sqrt(319) ;
else if (:n = 320) then r = sqrt(320) ;
else if (:n = 321) then r = sqrt(321) ;
else if (:n = 322) then r = sqrt(322) ;
else if (:n = 323) then r = sqrt(323) ;
else if (:n = 324) then r = sqrt(324) ;
else if (:n = 325) then r = sqrt(325) ;
else if (:n = 326) then r = sqrt(326) ;
else if (:n = 327) then r = sqrt(327) ;
else if (:n = 328) then r = sqrt(328) ;
else if (:n = 329) then r = sqrt(329) ;
else if (:n = 330) then r = sqrt(330) ;
else if (:n = 331) then r = sqrt(331) ;
else if (:n = 332) then r = sqrt(332) ;
else if (:n = 333) then r = sqrt(333) ;
else if (:n = 334) then r = sqrt(334) ;
else if (:n = 335) then r = sqrt(335) ;
else if (:n = 336) then r = sqrt(336) ;
else if (:n = 337) then r = sqrt(337) ;
else if (:n = 338) then r = sqrt(338) ;
else if (:n = 339) then r = sqrt(339) ;
else if (:n = 340) then r = sqrt(340) ;
else if (:n = 341) then r = sqrt(341) ;
else if (:n = 342) then r = sqrt(342) ;
else if (:n = 343) then r = sqrt(343) ;
else if (:n = 344) then r = sqrt(344) ;
else if (:n = 345) then r = sqrt(345) ;
else if (:n = 346) then r = sqrt(346) ;
else if (:n = 347) then r = sqrt(347) ;
else if (:n = 348) then r = sqrt(348) ;
else if (:n = 349) then r = sqrt(349) ;
else if (:n = 350) then r = sqrt(350) ;
else if (:n = 351) then r = sqrt(351) ;
else if (:n = 352) then r = sqrt(352) ;
else if (:n = 353) then r = sqrt(353) ;
else if (:n = 354) then r = sqrt(354) ;
else if (:n = 355) then r = sqrt(355) ;
else if (:n = 356) then r = sqrt(356) ;
else if (:n = 357) then r = sqrt(357) ;
else if (:n = 358) then r = sqrt(358) ;
else if (:n = 359) then r = sqrt(359) ;
else if (:n = 360) then r = sqrt(360) ;
else if (:n = 361) then r = sqrt(361) ;
else if (:n = 362) then r = sqrt(362) ;
else if (:n = 363) then r = sqrt(363) ;
else if (:n = 364) then r = sqrt(364) ;
else if (:n = 365) then r = sqrt(365) ;
else if (:n = 366) then r = sqrt(366) ;
else if (:n = 367) then r = sqrt(367) ;
else if (:n = 368) then r = sqrt(368) ;
else if (:n = 369) then r = sqrt(369) ;
else if (:n = 370) then r = sqrt(370) ;
else if (:n = 371) then r = sqrt(371) ;
else if (:n = 372) then r = sqrt(372) ;
else if (:n = 373) then r = sqrt(373) ;
else if (:n = 374) then r = sqrt(374) ;
else if (:n = 375) then r = sqrt(375) ;
else if (:n = 376) then r = sqrt(376) ;
else if (:n = 377) then r = sqrt(377) ;
else if (:n = 378) then r = sqrt(378) ;
else if (:n = 379) then r = sqrt(379) ;
else if (:n = 380) then r = sqrt(380) ;
else if (:n = 381) then r = sqrt(381) ;
else if (:n = 382) then r = sqrt(382) ;
else if (:n = 383) then r = sqrt(383) ;
else if (:n = 384) then r = sqrt(384) ;
else if (:n = 385) then r = sqrt(385) ;
else if (:n = 386) then r = sqrt(386) ;
else if (:n = 387) then r = sqrt(387) ;
else if (:n = 388) then r = sqrt(388) ;
else if (:n = 389) then r = sqrt(389) ;
else if (:n = 390) then r = sqrt(390) ;
else if (:n = 391) then r = sqrt(391) ;
else if (:n = 392) then r = sqrt(392) ;
else if (:n = 393) then r = sqrt(393) ;
else if (:n = 394) then r = sqrt(394) ;
else if (:n = 395) then r = sqrt(395) ;
else if (:n = 396) then r = sqrt(396) ;
else if (:n = 397) then r = sqrt(397) ;
else if (:n = 398) then r = sqrt(398) ;
else if (:n = 399) then r = sqrt(399) ;
else if (:n = 400) then r = sqrt(400) ;
else if (:n = 401) then r = sqrt(401) ;
else if (:n = 402) then r = sqrt(402) ;
else if (:n = 403) then r = sqrt(403) ;
else if (:n = 404) then r = sqrt(404) ;
else if (:n = 405) then r = sqrt(405) ;
else if (:n = 406) then r = sqrt(406) ;
else if (:n = 407) then r = sqrt(407) ;
else if (:n = 408) then r = sqrt(408) ;
else if (:n = 409) then r = sqrt(409) ;
else if (:n = 410) then r = sqrt(410) ;
else if (:n = 411) then r = sqrt(411) ;
else if (:n = 412) then r = sqrt(412) ;
else if (:n = 413) then r = sqrt(413) ;
else if (:n = 414) then r = sqrt(414) ;
else if (:n = 415) then r = sqrt(415) ;
else if (:n = 416) then r = sqrt(416) ;
else if (:n = 417) then r = sqrt(417) ;
else if (:n = 418) then r = sqrt(418) ;
else if (:n = 419) then r = sqrt(419) ;
else if (:n = 420) then r = sqrt(420) ;
else if (:n = 421) then r = sqrt(421) ;
else if (:n = 422) then r = sqrt(422) ;
else if (:n = 423) then r = sqrt(423) ;
else if (:n = 424) then r = sqrt(424) ;
else if (:n = 425) then r = sqrt(425) ;
else if (:n = 426) then r = sqrt(426) ;
else if (:n = 427) then r = sqrt(427) ;
else if (:n = 428) then r = sqrt(428) ;
else if (:n = 429) then r = sqrt(429) ;
else if (:n = 430) then r = sqrt(430) ;
else if (:n = 431) then r = sqrt(431) ;
else if (:n = 432) then r = sqrt(432) ;
else if (:n = 433) then r = sqrt(433) ;
else if (:n = 434) then r = sqrt(434) ;
else if (:n = 435) then r = sqrt(435) ;
else if (:n = 436) then r = sqrt(436) ;
else if (:n = 437) then r = sqrt(437) ;
else if (:n = 438) then r = sqrt(438) ;
else if (:n = 439) then r = sqrt(439) ;
else if (:n = 440) then r = sqrt(440) ;
else if (:n = 441) then r = sqrt(441) ;
else if (:n = 442) then r = sqrt(442) ;
else if (:n = 443) then r = sqrt(443) ;
else if (:n = 444) then r = sqrt(444) ;
else if (:n = 445) then r = sqrt(445) ;
else if (:n = 446) then r = sqrt(446) ;
else if (:n = 447) then r = sqrt(447) ;
else if (:n = 448) then r = sqrt(448) ;
else if (:n = 449) then r = sqrt(449) ;
else if (:n = 450) then r = sqrt(450) ;
else if (:n = 451) then r = sqrt(451) ;
else if (:n = 452) then r = sqrt(452) ;
else if (:n = 453) then r = sqrt(453) ;
else if (:n = 454) then r = sqrt(454) ;
else if (:n = 455) then r = sqrt(455) ;
else if (:n = 456) then r = sqrt(456) ;
else if (:n = 457) then r = sqrt(457) ;
else if (:n = 458) then r = sqrt(458) ;
else if (:n = 459) then r = sqrt(459) ;
else if (:n = 460) then r = sqrt(460) ;
else if (:n = 461) then r = sqrt(461) ;
else if (:n = 462) then r = sqrt(462) ;
else if (:n = 463) then r = sqrt(463) ;
else if (:n = 464) then r = sqrt(464) ;
else if (:n = 465) then r = sqrt(465) ;
else if (:n = 466) then r = sqrt(466) ;
else if (:n = 467) then r = sqrt(467) ;
else if (:n = 468) then r = sqrt(468) ;
else if (:n = 469) then r = sqrt(469) ;
else if (:n = 470) then r = sqrt(470) ;
else if (:n = 471) then r = sqrt(471) ;
else if (:n = 472) then r = sqrt(472) ;
else if (:n = 473) then r = sqrt(473) ;
else if (:n = 474) then r = sqrt(474) ;
else if (:n = 475) then r = sqrt(475) ;
else if (:n = 476) then r = sqrt(476) ;
else if (:n = 477) then r = sqrt(477) ;
else if (:n = 478) then r = sqrt(478) ;
else if (:n = 479) then r = sqrt(479) ;
else if (:n = 480) then r = sqrt(480) ;
else if (:n = 481) then r = sqrt(481) ;
else if (:n = 482) then r = sqrt(482) ;
else if (:n = 483) then r = sqrt(483) ;
else if (:n = 484) then r = sqrt(484) ;
else if (:n = 485) then r = sqrt(485) ;
else if (:n = 486) then r = sqrt(486) ;
else if (:n = 487) then r = sqrt(487) ;
else if (:n = 488) then r = sqrt(488) ;
else if (:n = 489) then r = sqrt(489) ;
else if (:n = 490) then r = sqrt(490) ;
else if (:n = 491) then r = sqrt(491) ;
else if (:n = 492) then r = sqrt(492) ;
else if (:n = 493) then r = sqrt(493) ;
else if (:n = 494) then r = sqrt(494) ;
else if (:n = 495) then r = sqrt(495) ;
else if (:n = 496) then r = sqrt(496) ;
else if (:n = 497) then r = sqrt(497) ;
else if (:n = 498) then r = sqrt(498) ;
else if (:n = 499) then r = sqrt(499) ;
else if (:n = 500) then r = sqrt(500) ;
else if (:n = 501) then r = sqrt(501) ;
else if (:n = 502) then r = sqrt(502) ;
else if (:n = 503) then r = sqrt(503) ;
else if (:n = 504) then r = sqrt(504) ;
else if (:n = 505) then r = sqrt(505) ;
else if (:n = 506) then r = sqrt(506) ;
else if (:n = 507) then r = sqrt(507) ;
else if (:n = 508) then r = sqrt(508) ;
else if (:n = 509) then r = sqrt(509) ;
else if (:n = 510) then r = sqrt(510) ;
else if (:n = 511) then r = sqrt(511) ;
else if (:n = 512) then r = sqrt(512) ;
else if (:n = 513) then r = sqrt(513) ;
else if (:n = 514) then r = sqrt(514) ;
else if (:n = 515) then r = sqrt(515) ;
else if (:n = 516) then r = sqrt(516) ;
else if (:n = 517) then r = sqrt(517) ;
else if (:n = 518) then r = sqrt(518) ;
else if (:n = 519) then r = sqrt(519) ;
else if (:n = 520) then r = sqrt(520) ;
else if (:n = 521) then r = sqrt(521) ;
else if (:n = 522) then r = sqrt(522) ;
else if (:n = 523) then r = sqrt(523) ;
else if (:n = 524) then r = sqrt(524) ;
else if (:n = 525) then r = sqrt(525) ;
else if (:n = 526) then r = sqrt(526) ;
else if (:n = 527) then r = sqrt(527) ;
else if (:n = 528) then r = sqrt(528) ;
else if (:n = 529) then r = sqrt(529) ;
else if (:n = 530) then r = sqrt(530) ;
else if (:n = 531) then r = sqrt(531) ;
else if (:n = 532) then r = sqrt(532) ;
else if (:n = 533) then r = sqrt(533) ;
else if (:n = 534) then r = sqrt(534) ;
else if (:n = 535) then r = sqrt(535) ;
else if (:n = 536) then r = sqrt(536) ;
else if (:n = 537) then r = sqrt(537) ;
else if (:n = 538) then r = sqrt(538) ;
else if (:n = 539) then r = sqrt(539) ;
else if (:n = 540) then r = sqrt(540) ;
else if (:n = 541) then r = sqrt(541) ;
else if (:n = 542) then r = sqrt(542) ;
else if (:n = 543) then r = sqrt(543) ;
else if (:n = 544) then r = sqrt(544) ;
else if (:n = 545) then r = sqrt(545) ;
else if (:n = 546) then r = sqrt(546) ;
else if (:n = 547) then r = sqrt(547) ;
else if (:n = 548) then r = sqrt(548) ;
else if (:n = 549) then r = sqrt(549) ;
else if (:n = 550) then r = sqrt(550) ;
else if (:n = 551) then r = sqrt(551) ;
else if (:n = 552) then r = sqrt(552) ;
else if (:n = 553) then r = sqrt(553) ;
else if (:n = 554) then r = sqrt(554) ;
else if (:n = 555) then r = sqrt(555) ;
else if (:n = 556) then r = sqrt(556) ;
else if (:n = 557) then r = sqrt(557) ;
else if (:n = 558) then r = sqrt(558) ;
else if (:n = 559) then r = sqrt(559) ;
else if (:n = 560) then r = sqrt(560) ;
else if (:n = 561) then r = sqrt(561) ;
else if (:n = 562) then r = sqrt(562) ;
else if (:n = 563) then r = sqrt(563) ;
else if (:n = 564) then r = sqrt(564) ;
else if (:n = 565) then r = sqrt(565) ;
else if (:n = 566) then r = sqrt(566) ;
else if (:n = 567) then r = sqrt(567) ;
else if (:n = 568) then r = sqrt(568) ;
else if (:n = 569) then r = sqrt(569) ;
else if (:n = 570) then r = sqrt(570) ;
else if (:n = 571) then r = sqrt(571) ;
else if (:n = 572) then r = sqrt(572) ;
else if (:n = 573) then r = sqrt(573) ;
else if (:n = 574) then r = sqrt(574) ;
else if (:n = 575) then r = sqrt(575) ;
else if (:n = 576) then r = sqrt(576) ;
else if (:n = 577) then r = sqrt(577) ;
else if (:n = 578) then r = sqrt(578) ;
else if (:n = 579) then r = sqrt(579) ;
else if (:n = 580) then r = sqrt(580) ;
else if (:n = 581) then r = sqrt(581) ;
else if (:n = 582) then r = sqrt(582) ;
else if (:n = 583) then r = sqrt(583) ;
else if (:n = 584) then r = sqrt(584) ;
else if (:n = 585) then r = sqrt(585) ;
else if (:n = 586) then r = sqrt(586) ;
else if (:n = 587) then r = sqrt(587) ;
else if (:n = 588) then r = sqrt(588) ;
else if (:n = 589) then r = sqrt(589) ;
else if (:n = 590) then r = sqrt(590) ;
else if (:n = 591) then r = sqrt(591) ;
else if (:n = 592) then r = sqrt(592) ;
else if (:n = 593) then r = sqrt(593) ;
else if (:n = 594) then r = sqrt(594) ;
else if (:n = 595) then r = sqrt(595) ;
else if (:n = 596) then r = sqrt(596) ;
else if (:n = 597) then r = sqrt(597) ;
else if (:n = 598) then r = sqrt(598) ;
else if (:n = 599) then r = sqrt(599) ;
else if (:n = 600) then r = sqrt(600) ;
else if (:n = 601) then r = sqrt(601) ;
else if (:n = 602) then r = sqrt(602) ;
else if (:n = 603) then r = sqrt(603) ;
else if (:n = 604) then r = sqrt(604) ;
else if (:n = 605) then r = sqrt(605) ;
else if (:n = 606) then r = sqrt(606) ;
else if (:n = 607) then r = sqrt(607) ;
else if (:n = 608) then r = sqrt(608) ;
else if (:n = 609) then r = sqrt(609) ;
else if (:n = 610) then r = sqrt(610) ;
else if (:n = 611) then r = sqrt(611) ;
else if (:n = 612) then r = sqrt(612) ;
else if (:n = 613) then r = sqrt(613) ;
else if (:n = 614) then r = sqrt(614) ;
else if (:n = 615) then r = sqrt(615) ;
else if (:n = 616) then r = sqrt(616) ;
else if (:n = 617) then r = sqrt(617) ;
else if (:n = 618) then r = sqrt(618) ;
else if (:n = 619) then r = sqrt(619) ;
else if (:n = 620) then r = sqrt(620) ;
else if (:n = 621) then r = sqrt(621) ;
else if (:n = 622) then r = sqrt(622) ;
else if (:n = 623) then r = sqrt(623) ;
else if (:n = 624) then r = sqrt(624) ;
else if (:n = 625) then r = sqrt(625) ;
else if (:n = 626) then r = sqrt(626) ;
else if (:n = 627) then r = sqrt(627) ;
else if (:n = 628) then r = sqrt(628) ;
else if (:n = 629) then r = sqrt(629) ;
else if (:n = 630) then r = sqrt(630) ;
else if (:n = 631) then r = sqrt(631) ;
else if (:n = 632) then r = sqrt(632) ;
else if (:n = 633) then r = sqrt(633) ;
else if (:n = 634) then r = sqrt(634) ;
else if (:n = 635) then r = sqrt(635) ;
else if (:n = 636) then r = sqrt(636) ;
else if (:n = 637) then r = sqrt(637) ;
else if (:n = 638) then r = sqrt(638) ;
else if (:n = 639) then r = sqrt(639) ;
else if (:n = 640) then r = sqrt(640) ;
else if (:n = 641) then r = sqrt(641) ;
else if (:n = 642) then r = sqrt(642) ;
else if (:n = 643) then r = sqrt(643) ;
else if (:n = 644) then r = sqrt(644) ;
else if (:n = 645) then r = sqrt(645) ;
else if (:n = 646) then r = sqrt(646) ;
else if (:n = 647) then r = sqrt(647) ;
else if (:n = 648) then r = sqrt(648) ;
else if (:n = 649) then r = sqrt(649) ;
else if (:n = 650) then r = sqrt(650) ;
else if (:n = 651) then r = sqrt(651) ;
else if (:n = 652) then r = sqrt(652) ;
else if (:n = 653) then r = sqrt(653) ;
else if (:n = 654) then r = sqrt(654) ;
else if (:n = 655) then r = sqrt(655) ;
else if (:n = 656) then r = sqrt(656) ;
else if (:n = 657) then r = sqrt(657) ;
else if (:n = 658) then r = sqrt(658) ;
else if (:n = 659) then r = sqrt(659) ;
else if (:n = 660) then r = sqrt(660) ;
else if (:n = 661) then r = sqrt(661) ;
else if (:n = 662) then r = sqrt(662) ;
else if (:n = 663) then r = sqrt(663) ;
else if (:n = 664) then r = sqrt(664) ;
else if (:n = 665) then r = sqrt(665) ;
else if (:n = 666) then r = sqrt(666) ;
else if (:n = 667) then r = sqrt(667) ;
else if (:n = 668) then r = sqrt(668) ;
else if (:n = 669) then r = sqrt(669) ;
else if (:n = 670) then r = sqrt(670) ;
else if (:n = 671) then r = sqrt(671) ;
else if (:n = 672) then r = sqrt(672) ;
else if (:n = 673) then r = sqrt(673) ;
else if (:n = 674) then r = sqrt(674) ;
else if (:n = 675) then r = sqrt(675) ;
else if (:n = 676) then r = sqrt(676) ;
else if (:n = 677) then r = sqrt(677) ;
else if (:n = 678) then r = sqrt(678) ;
else if (:n = 679) then r = sqrt(679) ;
else if (:n = 680) then r = sqrt(680) ;
else if (:n = 681) then r = sqrt(681) ;
else if (:n = 682) then r = sqrt(682) ;
else if (:n = 683) then r = sqrt(683) ;
else if (:n = 684) then r = sqrt(684) ;
else if (:n = 685) then r = sqrt(685) ;
else if (:n = 686) then r = sqrt(686) ;
else if (:n = 687) then r = sqrt(687) ;
else if (:n = 688) then r = sqrt(688) ;
else if (:n = 689) then r = sqrt(689) ;
else if (:n = 690) then r = sqrt(690) ;
else if (:n = 691) then r = sqrt(691) ;
else if (:n = 692) then r = sqrt(692) ;
else if (:n = 693) then r = sqrt(693) ;
else if (:n = 694) then r = sqrt(694) ;
else if (:n = 695) then r = sqrt(695) ;
else if (:n = 696) then r = sqrt(696) ;
else if (:n = 697) then r = sqrt(697) ;
else if (:n = 698) then r = sqrt(698) ;
else if (:n = 699) then r = sqrt(699) ;
else if (:n = 700) then r = sqrt(700) ;
else if (:n = 701) then r = sqrt(701) ;
else if (:n = 702) then r = sqrt(702) ;
else if (:n = 703) then r = sqrt(703) ;
else if (:n = 704) then r = sqrt(704) ;
else if (:n = 705) then r = sqrt(705) ;
else if (:n = 706) then r = sqrt(706) ;
else if (:n = 707) then r = sqrt(707) ;
else if (:n = 708) then r = sqrt(708) ;
else if (:n = 709) then r = sqrt(709) ;
else if (:n = 710) then r = sqrt(710) ;
else if (:n = 711) then r = sqrt(711) ;
else if (:n = 712) then r = sqrt(712) ;
else if (:n = 713) then r = sqrt(713) ;
else if (:n = 714) then r = sqrt(714) ;
else if (:n = 715) then r = sqrt(715) ;
else if (:n = 716) then r = sqrt(716) ;
else if (:n = 717) then r = sqrt(717) ;
else if (:n = 718) then r = sqrt(718) ;
else if (:n = 719) then r = sqrt(719) ;
else if (:n = 720) then r = sqrt(720) ;
else if (:n = 721) then r = sqrt(721) ;
else if (:n = 722) then r = sqrt(722) ;
else if (:n = 723) then r = sqrt(723) ;
else if (:n = 724) then r = sqrt(724) ;
else if (:n = 725) then r = sqrt(725) ;
else if (:n = 726) then r = sqrt(726) ;
else if (:n = 727) then r = sqrt(727) ;
else if (:n = 728) then r = sqrt(728) ;
else if (:n = 729) then r = sqrt(729) ;
else if (:n = 730) then r = sqrt(730) ;
else if (:n = 731) then r = sqrt(731) ;
else if (:n = 732) then r = sqrt(732) ;
else if (:n = 733) then r = sqrt(733) ;
else if (:n = 734) then r = sqrt(734) ;
else if (:n = 735) then r = sqrt(735) ;
else if (:n = 736) then r = sqrt(736) ;
else if (:n = 737) then r = sqrt(737) ;
else if (:n = 738) then r = sqrt(738) ;
else if (:n = 739) then r = sqrt(739) ;
else if (:n = 740) then r = sqrt(740) ;
else if (:n = 741) then r = sqrt(741) ;
else if (:n = 742) then r = sqrt(742) ;
else if (:n = 743) then r = sqrt(743) ;
else if (:n = 744) then r = sqrt(744) ;
else if (:n = 745) then r = sqrt(745) ;
else if (:n = 746) then r = sqrt(746) ;
else if (:n = 747) then r = sqrt(747) ;
else if (:n = 748) then r = sqrt(748) ;
else if (:n = 749) then r = sqrt(749) ;
else if (:n = 750) then r = sqrt(750) ;
else if (:n = 751) then r = sqrt(751) ;
else if (:n = 752) then r = sqrt(752) ;
else if (:n = 753) then r = sqrt(753) ;
else if (:n = 754) then r = sqrt(754) ;
else if (:n = 755) then r = sqrt(755) ;
else if (:n = 756) then r = sqrt(756) ;
else if (:n = 757) then r = sqrt(757) ;
else if (:n = 758) then r = sqrt(758) ;
else if (:n = 759) then r = sqrt(759) ;
else if (:n = 760) then r = sqrt(760) ;
else if (:n = 761) then r = sqrt(761) ;
else if (:n = 762) then r = sqrt(762) ;
else if (:n = 763) then r = sqrt(763) ;
else if (:n = 764) then r = sqrt(764) ;
else if (:n = 765) then r = sqrt(765) ;
else if (:n = 766) then r = sqrt(766) ;
else if (:n = 767) then r = sqrt(767) ;
else if (:n = 768) then r = sqrt(768) ;
else if (:n = 769) then r = sqrt(769) ;
else if (:n = 770) then r = sqrt(770) ;
else if (:n = 771) then r = sqrt(771) ;
else if (:n = 772) then r = sqrt(772) ;
else if (:n = 773) then r = sqrt(773) ;
else if (:n = 774) then r = sqrt(774) ;
else if (:n = 775) then r = sqrt(775) ;
else if (:n = 776) then r = sqrt(776) ;
else if (:n = 777) then r = sqrt(777) ;
else if (:n = 778) then r = sqrt(778) ;
else if (:n = 779) then r = sqrt(779) ;
else if (:n = 780) then r = sqrt(780) ;
else if (:n = 781) then r = sqrt(781) ;
else if (:n = 782) then r = sqrt(782) ;
else if (:n = 783) then r = sqrt(783) ;
else if (:n = 784) then r = sqrt(784) ;
else if (:n = 785) then r = sqrt(785) ;
else if (:n = 786) then r = sqrt(786) ;
else if (:n = 787) then r = sqrt(787) ;
else if (:n = 788) then r = sqrt(788) ;
else if (:n = 789) then r = sqrt(789) ;
else if (:n = 790) then r = sqrt(790) ;
else if (:n = 791) then r = sqrt(791) ;
else if (:n = 792) then r = sqrt(792) ;
else if (:n = 793) then r = sqrt(793) ;
else if (:n = 794) then r = sqrt(794) ;
else if (:n = 795) then r = sqrt(795) ;
else if (:n = 796) then r = sqrt(796) ;
else if (:n = 797) then r = sqrt(797) ;
else if (:n = 798) then r = sqrt(798) ;
else if (:n = 799) then r = sqrt(799) ;
else if (:n = 800) then r = sqrt(800) ;
else if (:n = 801) then r = sqrt(801) ;
else if (:n = 802) then r = sqrt(802) ;
else if (:n = 803) then r = sqrt(803) ;
else if (:n = 804) then r = sqrt(804) ;
else if (:n = 805) then r = sqrt(805) ;
else if (:n = 806) then r = sqrt(806) ;
else if (:n = 807) then r = sqrt(807) ;
else if (:n = 808) then r = sqrt(808) ;
else if (:n = 809) then r = sqrt(809) ;
else if (:n = 810) then r = sqrt(810) ;
else if (:n = 811) then r = sqrt(811) ;
else if (:n = 812) then r = sqrt(812) ;
else if (:n = 813) then r = sqrt(813) ;
else if (:n = 814) then r = sqrt(814) ;
else if (:n = 815) then r = sqrt(815) ;
else if (:n = 816) then r = sqrt(816) ;
else if (:n = 817) then r = sqrt(817) ;
else if (:n = 818) then r = sqrt(818) ;
else if (:n = 819) then r = sqrt(819) ;
else if (:n = 820) then r = sqrt(820) ;
else if (:n = 821) then r = sqrt(821) ;
else if (:n = 822) then r = sqrt(822) ;
else if (:n = 823) then r = sqrt(823) ;
else if (:n = 824) then r = sqrt(824) ;
else if (:n = 825) then r = sqrt(825) ;
else if (:n = 826) then r = sqrt(826) ;
else if (:n = 827) then r = sqrt(827) ;
else if (:n = 828) then r = sqrt(828) ;
else if (:n = 829) then r = sqrt(829) ;
else if (:n = 830) then r = sqrt(830) ;
else if (:n = 831) then r = sqrt(831) ;
else if (:n = 832) then r = sqrt(832) ;
else if (:n = 833) then r = sqrt(833) ;
else if (:n = 834) then r = sqrt(834) ;
else if (:n = 835) then r = sqrt(835) ;
else if (:n = 836) then r = sqrt(836) ;
else if (:n = 837) then r = sqrt(837) ;
else if (:n = 838) then r = sqrt(838) ;
else if (:n = 839) then r = sqrt(839) ;
else if (:n = 840) then r = sqrt(840) ;
else if (:n = 841) then r = sqrt(841) ;
else if (:n = 842) then r = sqrt(842) ;
else if (:n = 843) then r = sqrt(843) ;
else if (:n = 844) then r = sqrt(844) ;
else if (:n = 845) then r = sqrt(845) ;
else if (:n = 846) then r = sqrt(846) ;
else if (:n = 847) then r = sqrt(847) ;
else if (:n = 848) then r = sqrt(848) ;
else if (:n = 849) then r = sqrt(849) ;
else if (:n = 850) then r = sqrt(850) ;
else if (:n = 851) then r = sqrt(851) ;
else if (:n = 852) then r = sqrt(852) ;
else if (:n = 853) then r = sqrt(853) ;
else if (:n = 854) then r = sqrt(854) ;
else if (:n = 855) then r = sqrt(855) ;
else if (:n = 856) then r = sqrt(856) ;
else if (:n = 857) then r = sqrt(857) ;
else if (:n = 858) then r = sqrt(858) ;
else if (:n = 859) then r = sqrt(859) ;
else if (:n = 860) then r = sqrt(860) ;
else if (:n = 861) then r = sqrt(861) ;
else if (:n = 862) then r = sqrt(862) ;
else if (:n = 863) then r = sqrt(863) ;
else if (:n = 864) then r = sqrt(864) ;
else if (:n = 865) then r = sqrt(865) ;
else if (:n = 866) then r = sqrt(866) ;
else if (:n = 867) then r = sqrt(867) ;
else if (:n = 868) then r = sqrt(868) ;
else if (:n = 869) then r = sqrt(869) ;
else if (:n = 870) then r = sqrt(870) ;
else if (:n = 871) then r = sqrt(871) ;
else if (:n = 872) then r = sqrt(872) ;
else if (:n = 873) then r = sqrt(873) ;
else if (:n = 874) then r = sqrt(874) ;
else if (:n = 875) then r = sqrt(875) ;
else if (:n = 876) then r = sqrt(876) ;
else if (:n = 877) then r = sqrt(877) ;
else if (:n = 878) then r = sqrt(878) ;
else if (:n = 879) then r = sqrt(879) ;
else if (:n = 880) then r = sqrt(880) ;
else if (:n = 881) then r = sqrt(881) ;
else if (:n = 882) then r = sqrt(882) ;
else if (:n = 883) then r = sqrt(883) ;
else if (:n = 884) then r = sqrt(884) ;
else if (:n = 885) then r = sqrt(885) ;
else if (:n = 886) then r = sqrt(886) ;
else if (:n = 887) then r = sqrt(887) ;
else if (:n = 888) then r = sqrt(888) ;
else if (:n = 889) then r = sqrt(889) ;
else if (:n = 890) then r = sqrt(890) ;
else if (:n = 891) then r = sqrt(891) ;
else if (:n = 892) then r = sqrt(892) ;
else if (:n = 893) then r = sqrt(893) ;
else if (:n = 894) then r = sqrt(894) ;
else if (:n = 895) then r = sqrt(895) ;
else if (:n = 896) then r = sqrt(896) ;
else if (:n = 897) then r = sqrt(897) ;
else if (:n = 898) then r = sqrt(898) ;
else if (:n = 899) then r = sqrt(899) ;
else if (:n = 900) then r = sqrt(900) ;
else if (:n = 901) then r = sqrt(901) ;
else if (:n = 902) then r = sqrt(902) ;
else if (:n = 903) then r = sqrt(903) ;
else if (:n = 904) then r = sqrt(904) ;
else if (:n = 905) then r = sqrt(905) ;
else if (:n = 906) then r = sqrt(906) ;
else if (:n = 907) then r = sqrt(907) ;
else if (:n = 908) then r = sqrt(908) ;
else if (:n = 909) then r = sqrt(909) ;
else if (:n = 910) then r = sqrt(910) ;
else if (:n = 911) then r = sqrt(911) ;
else if (:n = 912) then r = sqrt(912) ;
else if (:n = 913) then r = sqrt(913) ;
else if (:n = 914) then r = sqrt(914) ;
else if (:n = 915) then r = sqrt(915) ;
else if (:n = 916) then r = sqrt(916) ;
else if (:n = 917) then r = sqrt(917) ;
else if (:n = 918) then r = sqrt(918) ;
else if (:n = 919) then r = sqrt(919) ;
else if (:n = 920) then r = sqrt(920) ;
else if (:n = 921) then r = sqrt(921) ;
else if (:n = 922) then r = sqrt(922) ;
else if (:n = 923) then r = sqrt(923) ;
else if (:n = 924) then r = sqrt(924) ;
else if (:n = 925) then r = sqrt(925) ;
else if (:n = 926) then r = sqrt(926) ;
else if (:n = 927) then r = sqrt(927) ;
else if (:n = 928) then r = sqrt(928) ;
else if (:n = 929) then r = sqrt(929) ;
else if (:n = 930) then r = sqrt(930) ;
else if (:n = 931) then r = sqrt(931) ;
else if (:n = 932) then r = sqrt(932) ;
else if (:n = 933) then r = sqrt(933) ;
else if (:n = 934) then r = sqrt(934) ;
else if (:n = 935) then r = sqrt(935) ;
else if (:n = 936) then r = sqrt(936) ;
else if (:n = 937) then r = sqrt(937) ;
else if (:n = 938) then r = sqrt(938) ;
else if (:n = 939) then r = sqrt(939) ;
else if (:n = 940) then r = sqrt(940) ;
else if (:n = 941) then r = sqrt(941) ;
else if (:n = 942) then r = sqrt(942) ;
else if (:n = 943) then r = sqrt(943) ;
else if (:n = 944) then r = sqrt(944) ;
else if (:n = 945) then r = sqrt(945) ;
else if (:n = 946) then r = sqrt(946) ;
else if (:n = 947) then r = sqrt(947) ;
else if (:n = 948) then r = sqrt(948) ;
else if (:n = 949) then r = sqrt(949) ;
else if (:n = 950) then r = sqrt(950) ;
else if (:n = 951) then r = sqrt(951) ;
else if (:n = 952) then r = sqrt(952) ;
else if (:n = 953) then r = sqrt(953) ;
else if (:n = 954) then r = sqrt(954) ;
else if (:n = 955) then r = sqrt(955) ;
else if (:n = 956) then r = sqrt(956) ;
else if (:n = 957) then r = sqrt(957) ;
else if (:n = 958) then r = sqrt(958) ;
else if (:n = 959) then r = sqrt(959) ;
else if (:n = 960) then r = sqrt(960) ;
else if (:n = 961) then r = sqrt(961) ;
else if (:n = 962) then r = sqrt(962) ;
else if (:n = 963) then r = sqrt(963) ;
else if (:n = 964) then r = sqrt(964) ;
else if (:n = 965) then r = sqrt(965) ;
else if (:n = 966) then r = sqrt(966) ;
else if (:n = 967) then r = sqrt(967) ;
else if (:n = 968) then r = sqrt(968) ;
else if (:n = 969) then r = sqrt(969) ;
else if (:n = 970) then r = sqrt(970) ;
else if (:n = 971) then r = sqrt(971) ;
else if (:n = 972) then r = sqrt(972) ;
else if (:n = 973) then r = sqrt(973) ;
else if (:n = 974) then r = sqrt(974) ;
else if (:n = 975) then r = sqrt(975) ;
else if (:n = 976) then r = sqrt(976) ;
else if (:n = 977) then r = sqrt(977) ;
else if (:n = 978) then r = sqrt(978) ;
else if (:n = 979) then r = sqrt(979) ;
else if (:n = 980) then r = sqrt(980) ;
else if (:n = 981) then r = sqrt(981) ;
else if (:n = 982) then r = sqrt(982) ;
else if (:n = 983) then r = sqrt(983) ;
else if (:n = 984) then r = sqrt(984) ;
else if (:n = 985) then r = sqrt(985) ;
else if (:n = 986) then r = sqrt(986) ;
else if (:n = 987) then r = sqrt(987) ;
else if (:n = 988) then r = sqrt(988) ;
else if (:n = 989) then r = sqrt(989) ;
else if (:n = 990) then r = sqrt(990) ;
else if (:n = 991) then r = sqrt(991) ;
else if (:n = 992) then r = sqrt(992) ;
else if (:n = 993) then r = sqrt(993) ;
else if (:n = 994) then r = sqrt(994) ;
else if (:n = 995) then r = sqrt(995) ;
else if (:n = 996) then r = sqrt(996) ;
else if (:n = 997) then r = sqrt(997) ;
else if (:n = 998) then r = sqrt(998) ;
else if (:n = 999) then r = sqrt(999) ;
else r = sqrt(1000);
suspend;
end ^
set term ;^
set list on;
select * from sp_ifel(1000);
"""
act = isql_act('db', test_script)
expected_stdout = """
R 31.62277660168379
"""
@pytest.mark.version('>=3')
def test_1(act: Action):
act.expected_stdout = expected_stdout
act.execute()
assert act.clean_stdout == act.clean_expected_stdout