mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 04:38:16 +00:00
big: Improved zero_unused helper.
This commit is contained in:
@@ -65,13 +65,19 @@ demo :: proc() {
|
||||
a, b, c, d, e, f := &Int{}, &Int{}, &Int{}, &Int{}, &Int{}, &Int{};
|
||||
defer destroy(a, b, c, d, e, f);
|
||||
|
||||
foo := "686885735734829009541949746871140768343076607029752932751182108475420900392874228486622313727012705619148037570309621219533087263900443932890792804879473795673302686046941536636874184361869252299636701671980034458333859202703255467709267777184095435235980845369829397344182319113372092844648570818726316581751114346501124871729572474923695509057166373026411194094493240101036672016770945150422252961487398124677567028263059046193391737576836378376192651849283925197438927999526058932679219572030021792914065825542626400207956134072247020690107136531852625253942429167557531123651471221455967386267137846791963149859804549891438562641323068751514370656287452006867713758971418043865298618635213551059471668293725548570452377976322899027050925842868079489675596835389444833567439058609775325447891875359487104691935576723532407937236505941186660707032433807075470656782452889754501872408562496805517394619388777930253411467941214807849472083814447498068636264021405175653742244368865090604940094889189800007448083930490871954101880815781177612910234741529950538835837693870921008635195545246771593130784786737543736434086434015200264933536294884482218945403958647118802574342840790536176272341586020230110889699633073513016344826709214";
|
||||
err := atoi(a, foo, 10);
|
||||
N :: 12345;
|
||||
D :: 4;
|
||||
|
||||
if err != nil do fmt.printf("atoi returned %v\n", err);
|
||||
|
||||
print("foo: ", a);
|
||||
set(a, N);
|
||||
print("a: ", a);
|
||||
div(b, a, D);
|
||||
rem, _ := mod(a, D);
|
||||
print("b: ", b);
|
||||
fmt.printf("rem: %v\n", rem);
|
||||
|
||||
mul(b, b, D);
|
||||
add(b, b, rem);
|
||||
print("b: ", b);
|
||||
}
|
||||
|
||||
main :: proc() {
|
||||
|
||||
Reference in New Issue
Block a user