Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

28
LINES

< > BotCompany Repo | #1003125 // div - make HTML <div>; also: divide BigIntegers, Complex and even doubles

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (4760L) is out of date.

ifndef div_noHTML
sS div(O contents, O... params) {
  ret hdiv(contents, params);
}

sS div() {
  ret hdiv();
}
endifndef

static BigInt div(BigInt a, BigInt b) {
  ret a.divide(b);
}

static BigInt div(BigInt a, int b) {
  ret a.divide(bigint(b));
}

ifclass Complex
static Complex div(Complex a, double b) {
  ret Complex(a.re/b, a.im/b);
}
endif

static double div(double a, double b) { ret a/b; }
static double div(double a, int b) { ret a/b; }
static long div(long a, long b) { ret a/b; }
static int div(int a, int b) { ret a/b; }

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, elmgxqgtpvxh, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003125
Snippet name: div - make HTML <div>; also: divide BigIntegers, Complex and even doubles
Eternal ID of this version: #1003125/14
Text MD5: 93f415536045211f6b59b25a962d55e1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-11-16 22:52:18
Source code size: 562 bytes / 28 lines
Pitched / IR pitched: No / No
Views / Downloads: 749 / 820
Version history: 13 change(s)
Referenced in: [show references]