Cody

Solution 2169415

Submitted on 22 Mar 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
x = 0.5; y_correct = 11; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test1 (line 3) assert(isequal(spiral_ratio(x),y_correct))

2   Fail
x = 0.4; y_correct = 31; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test2 (line 3) assert(isequal(spiral_ratio(x),y_correct))

3   Fail
x = 0.3; y_correct = 49; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test3 (line 3) assert(isequal(spiral_ratio(x),y_correct))

4   Fail
x = 0.25; y_correct = 99; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test4 (line 3) assert(isequal(spiral_ratio(x),y_correct))

5   Fail
x = 0.2; y_correct = 309; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test5 (line 3) assert(isequal(spiral_ratio(x),y_correct))

6   Fail
x = 0.15; y_correct = 981; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test6 (line 3) assert(isequal(spiral_ratio(x),y_correct))

7   Fail
x = 0.14; y_correct = 1883; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test7 (line 3) assert(isequal(spiral_ratio(x),y_correct))

8   Fail
x = 0.13; y_correct = 3593; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test8 (line 3) assert(isequal(spiral_ratio(x),y_correct))

9   Fail
x = 0.12; y_correct = 6523; assert(isequal(spiral_ratio(x),y_correct))

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test9 (line 3) assert(isequal(spiral_ratio(x),y_correct))

10   Fail
x = 0.11; y_correct = 12201; assert(isequal(spiral_ratio(x),y_correct)) %% Solution of Project Euler 58 with x=0.1

total = 0.4667 total = 0.4118 total = 0.3684 total = 0.3333 total = 0.3043 total = 0.2800 total = 0.2593 total = 0.2759 total = 0.2903 total = 0.3030 total = 0.3143 total = 0.3243 total = 0.3333 total = 0.3415 total = 0.3488 total = 0.3556 total = 0.3617 total = 0.3673 total = 0.3725 total = 0.3774 total = 0.3818 total = 0.3860 total = 0.3898 total = 0.3934 total = 0.3968 total = 0.4000 total = 0.4030 total = 0.4058 total = 0.4085 total = 0.4110 total = 0.4133 total = 0.4156 total = 0.4177 total = 0.4198 total = 0.4217 total = 0.4235 total = 0.4253 total = 0.4270 total = 0.4286 total = 0.4301 total = 0.4316 total = 0.4330 total = 0.4343 total = 0.4356 total = 0.4369 total = 0.4381 total = 0.4393 total = 0.4312 total = 0.4234 total = 0.4248 total = 0.4261 total = 0.4188 total = 0.4202 total = 0.4215 total = 0.4228 total = 0.4240 total = 0.4173 total = 0.4186 total = 0.4198 total = 0.4211 total = 0.4222 total = 0.4234 total = 0.4245 total = 0.4184 total = 0.4196 total = 0.4207 total = 0.4218 total = 0.4228 total = 0.4238 total = 0.4248 total = 0.4258 total = 0.4268 total = 0.4214 total = 0.4224 total = 0.4233 total = 0.4242 total = 0.4251 total = 0.4260 total = 0.4269 total = 0.4277 total = 0.4286 total = 0.4294 total = 0.4302 total = 0.4254 total = 0.4262 total = 0.4270 total = 0.4278 total = 0.4286 total = 0.4241 total = 0.4197 total = 0.4205 total = 0.4162 total = 0.4171 total = 0.4179 total = 0.4138 total = 0.4146 total = 0.4106 total = 0.4115 total = 0.4076 total = 0.4085

Output argument "res" (and maybe others) not assigned during call to "spiral_ratio". Error in Test10 (line 3) assert(isequal(spiral_ratio(x),y_correct))