Similarly to Binary Arithmetic, Octal Arithmetic can be done using following module,
OA:=module() export o,`+`,`-`,`*`,`/`,`^`;
local c;
`+`:=()->:-`+`(args); `-`:=()->:-`-`(args); `*`:=()->:-`*`(args); 
`/`:=()->:-`/`(args); `^`:=()->:-`^`(args);
c:=overload([
proc(a::{float,integer}) option overload; convert(a,octal) end,
proc(a::fraction) option overload; applyop(c,{1,2},a) end,
proc(a::Not(numeric)) option overload; subsindets(a,numeric,c) end]);
o:=(a::uneval)->c(eval(subsindets(a,numeric,x->convert(x,decimal,8)))) end:
For example,
with(OA):
o(sqrt(10));
                                   1/2
                                2 2
o(1/6+1/11);
                                 5/22
o(evalf(Pi+6));
                             11.11037552
etc. Similarly to Binary Arithmetic, it has a glitch with scientific notation,
o(0.1*10^10000);
                                        4095
                         0.7777777777 10

Please Wait...