-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a020da6
commit 2531fcc
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#======================================================= | ||
# Arturo | ||
# Programming Language + Bytecode VM compiler | ||
# (c) 2019-2023 Yanis Zafirópulos | ||
# | ||
# @file: helpers/packager.nim | ||
#======================================================= | ||
|
||
#======================================= | ||
# Libraries | ||
#======================================= | ||
|
||
# import algorithm, bitops, std/math, sequtils, sugar | ||
|
||
# when defined(WEB): | ||
# import std/jsbigints | ||
# elif not defined(NOGMP): | ||
# import helpers/bignums as BignumsHelper | ||
|
||
# when defined(NOGMP): | ||
# import vm/errors | ||
|
||
# import vm/values/value | ||
|
||
#======================================= | ||
# Methods | ||
#======================================= | ||
|
||
# func addmod*[T: SomeInteger](a, b, modulus: T): T = | ||
# let a_m = if a < modulus: a else: a mod modulus | ||
# if b == 0.T: return a_m | ||
# let b_m = if b < modulus: b else: b mod modulus | ||
|
||
# let b_from_m = modulus - b_m | ||
# if a_m >= b_from_m: return a_m - b_from_m | ||
# return a_m + b_m |