Help with handwritten advanced number system

Jokes aside, if you’re only using integers, some bitwise trickery can squeze an extra 33e-5 μs when in native mode.

local function IsEven(Integer: number): boolean
	return bit32.bor(Integer, 1) > Integer
end

Note that bit32 functions trims the fractional off, so IsEven(2.5) == true unlike with modulus.

-math.huge will also be true because it converts to 0 > -math.huge.

3 Likes

See now we’ve actually made it too complicated

Just use this bruh…

local function isEven(value)
	local numbers = {}
	for number = -9007199254740992, 9007199254740992 do
		table.insert(numbers, number)
	end
	
	local isOdd = false
	for index, number in ipairs(table.clone(numbers)) do
		if isOdd then
			table.remove(numbers, index)
		end
		
		isOdd = not isOdd
	end
	
	if table.find(numbers, value) then
		return true
	end
	
	return false
end

Way to complicated, iterating through 9 quadrillion numbers less efficient

I have mixed emotions seeing this code. I laugh, I cringe, and I’m hurt all at the same time. Nothing has ever made me feel this way until now.

Personally, I think you should be very happy about this amazing breakthrough; think of how simple and efficient your code will be now.

How did ya’ll like 10 million update?

Small snippet going to 1k:

local number = 1
local ifEven = print("Even")
local ifUnEven = print("Uneven")

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

Responding to ya’ll

Why would you cringe? This is really advanced code I’ve spent over a week on.

Exacly!

True

Too complicated

This is wayy to complicated than complicated complications ya’ll complicated before.

my code is useful?

Yuck, how could you use this?

2 Likes

Thanks you so much for this awesome update

1 Like

The amount of RAM you have to render over 20 million lines is incredible.

3 Likes

Wow this is really cool! Way more efficient than anything I’ve been trying. Now I can finally finish my game! :]

Would it be okay if I ported this to Scratch? I think it’d be really useful.

2 Likes

when should we be getting an update to 100million. i need it asap

1 Like

Please tell me you were just trolling

1 Like

Too complicated. Like literally stop posting is complicated code.

1 Like

Nope, why would I? I’m just heling people by creating a really big base of numbers which can be used in various ways.

1 Like

If you really only care about integers, you can shave off even more time by replacing IsOdd(N) with the inline call bit32.btest(N,1) and IsEven(N) with not bit32.btest(N,1).

bit32.btest is about 10% faster than bit32.bor or bit32.band plus a Lua compare, but removing the function wrapper by inlining is the HUGE win, typically a 600-700% speed up over wrapping it in another local function. This is why C preprocessor macros were such a big deal before inline hinting and smarter compilers, you remove a jump and the need to push and pull from the call stack 1 extra time.

5 Likes

Must be a new addition to the library! I realized autocoercing produced correct answers for floats, so the only problematic values are NaNs and infinities.

Also, with --!optimize 2 mode (default on live servers), local functions can be inlined since they don’t need to produce a traceback.

2 Likes

This is madness …

function isEven(number)
	return number % 2 == 0
end

This is math …

function isOdd(number)
    return number % 2 ~= 0
end

And Odd …

1 Like

over 2 million lines is absolutely nuts

function is_even(number)
    if number % 2 == 0 then
        return true
    else
        return false
    end
end
function is_prime(number)
    if number <= 1 then
        return false
    end
    for i = 2, math.sqrt(number) do
        if number % i == 0 then
            return false
        end
    end
    return true
end
1 Like

Apparently that code is so complicated that their way is much much better.

Yeah, you should probably know this is just a joke right? right?!?!?!?!?!?!?!?

1 Like

This isn’t needed …

function isEven(number)
	return number % 2 == 0
end

This will return true or false …

1 Like