2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

15
tpt/nf.sql Normal file
View File

@@ -0,0 +1,15 @@
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
define _nf_precision=2
define _nf_base=2
define _nf_grouplen=10
define _nf_v=&1
select round ( &_nf_v / power( &_nf_base , trunc(log(&_nf_base,&_nf_v))-trunc(mod(log(&_nf_base,&_nf_v),&_nf_grouplen)) ), &_nf_precision )
|| decode( trunc(log(&_nf_base,&_nf_v))-trunc(mod(log(&_nf_base,&_nf_v),&_nf_grouplen))
, 0,'', 1,'', &_nf_grouplen*1,'k', &_nf_grouplen*2,'M', &_nf_grouplen*3,'G', &_nf_grouplen*4,'T', &_nf_grouplen*5,'P', &_nf_grouplen*6,'E'
, '*&_nf_base^'||to_char( trunc(log(&_nf_base,&_nf_v))-trunc(mod(log(&_nf_base,&_nf_v),&_nf_grouplen)) )
) output
from dual;