Oracle PL/SQL Tutorial/Numerical Math Functions/to binary double
Версия от 13:45, 26 мая 2010; (обсуждение)
v_double_nr:= to_binary_double(numeric variable)
SQL>
SQL> set timing on
SQL>
SQL> declare
2 v_nr number;
3 begin
4 for i in 1..1000000 loop
5 v_nr:=sqrt(i);
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:01.54
SQL>
SQL> declare
2 v_nr binary_float;
3 begin
4 for i in 1..1000000 loop
5 v_nr:=sqrt(to_binary_float(i));
6 end loop;
7 end;
8 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.51
SQL>
SQL> set timing off
SQL>