login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxPhysicalUnitSystem revision 1 of 3

1 2 3
Editor: pagani
Time: 2018/07/16 16:38:54 GMT+0
Note:

changed:
-
\begin{spad}
)abbrev category PUNIT PhysicalUnit
PhysicalUnit() : Category == with   
    "*"  : (%,%) -> %
    "/"  : (%,%) -> %
    "^"  : (%,Integer) -> %
    "="  : (%,%) -> Boolean
    dim  : % -> List Integer
    one  : %
    coerce : % -> OutputForm


)abbrev domain PUSYS PhysicalUnitSystem 
PhysicalUnitSystem(u:List Symbol) : Exports == Implementation where
    BASU ==> OrderedVariableList(u) 
    FAGB ==> FreeModule(Integer,BASU) 
    Exports == Join(PhysicalUnit,CoercibleTo OutputForm) with
      _* : (%,%) -> %
      _/ : (%,%) -> %
      baseSymbols : List Symbol
      baseUnits : List %
      factors : % ->  List Record(gen: BASU,exp: Integer)
    Implementation == FreeGroup(BASU) add
      Rep:=FreeModule(Integer,BASU)
      sort: % -> %
      x * y == sort(x+y) 
      x / y == sort(x-y)
      x ^ n == sort(n*x) 
      one() == 0$Rep
      baseSymbols() == [convert(x)@Symbol for x in enumerate$BASU]
      baseUnits() == [x::% for x in enumerate$BASU]
      dim(x) ==
        d:=[0@Integer for j in 1..#u]
        lr:List(Record(gen:BASU,exp:Integer)):=factors(x)
        for r in lr repeat
          g:BASU:=r.gen
          k:=position(g,enumerate$BASU)$List(BASU)
          d.k:=r.exp
        d

      x = y == test(dim x = dim y)                                      
      
      coerce0(x:%):OutputForm ==
        #monomials(x) = 0 => outputForm(1)
        d:=dim(x)
        b:=baseSymbols()
        y:List OutputForm:=[]
        for j in 1..#d repeat
          if d.j=1 then y:=concat(y,outputForm(b.j))
          else
            if d.j~=0 then y:=concat(y,outputForm(b.j)^outputForm(d.j))
        blankSeparate y 

      sort(x:%):% ==
        R==>Record(gen: BASU,exp: Integer)
        f:=(a:R,b:R):Boolean+->(test(a.gen>b.gen))
        sort(f,factors x) pretend Rep 


-- SI:=PUSYS(['m,'kg,'s])
-- u:=baseUnits()$SI
-- coerce0 works as coerce, if sort then not necess.

)abbrev domain PQTY PhysQty
PhysQty(U): Exports == Implementation where
    
    Q   ==> Fraction(Integer)
    F   ==> Float
    R   ==> DoubleFloat
    I   ==> Integer
    OF  ==> OutputForm
    PI  ==> PositiveInteger
    IVF ==> Interval Float
    U:PhysicalUnit
       
    
    Exports == Join(CoercibleTo OutputForm) with
      _* : (%,%) -> %
      _/ : (%,%) -> %
      _+ : (%,%) -> %
      _- : (%,%) -> %
      _^ : (%,Integer) -> %
      _- : % -> %
      
      ival : % -> IVF
      unit : % -> U    
          
      elt : (IVF,U) -> %
      elt : (F,U) -> %
      
      setOutputMode : PI -> PI
      coerce : % -> OutputForm
    
    Implementation ==  add 
    
      Rep := Record(ival:IVF, unit:U)
      
      outputMode:PI:=1
      
      x * y == [x.ival * y.ival, x.unit * y.unit]$Rep
      x / y ==
        r:Union(IVF,"failed"):=recip(y.ival)
        r case IVF => [x.ival * r, x.unit / y.unit]$Rep
        error "failed"
      x + y == 
        x.unit=y.unit => [x.ival + y.ival, x.unit]$Rep
        error "failed"
      x - y == 
        x.unit=y.unit => [x.ival - y.ival, x.unit]$Rep
        error "failed"
      x ^ n == 
        n > 0 => [x.ival^n::PI, x.unit^n::PI]$Rep
        n = 0 => [interval(1.0,1.0)$IVF, one()]$Rep
        r:Union(IVF,"failed"):=recip(x.ival)
        m:PI:=(-n)::PI
        r case IVF => [r^m, x.unit^n]$Rep
        error "failed"
                      
      - x   == [-x.ival, x.unit]$Rep 


      ival x == x.ival
      unit x == x.unit

      elt(v:IVF,u:U):% == [v,u]$Rep
      elt(v:F,u:U):%   == [interval(v)$IVF,u]$Rep
      
      setOutputMode(s:PI):PI ==
        modes:List PI:= [1,2,3]
        if member?(s,modes) then 
            outputMode := s
            return s
        error "1: plusMinus, 2: single, 3: interval"
      
      coerce(x) ==
        pm:Character:=char(177)
        pmof:=pm::String::Symbol::OF
        val:Float:=(sup(x.ival)+inf(x.ival))/2
        err:Float:=sup(x.ival)-val
        outputMode=1 => blankSeparate [val::OF,pmof,err::OF,x.unit::OF]
        outputMode=2 => blankSeparate [val::OF,x.unit::OF]
        outputMode=3 => blankSeparate [x.ival::OF,x.unit::OF]


                                                                    
)abbrev package SI SIunits                                                
SIunits : Exports == Implementation where
  
    USY ==> ['m,'kg,'s,'A,'K,'mol,'cd]                                  
    SIU ==> PhysicalUnitSystem(USY)     
                                                  
    Exports == with
  
      %m   : Integer -> SIU
      %kg  : Integer -> SIU        
      %s   : Integer -> SIU
      %A   : Integer -> SIU
      %K   : Integer -> SIU
      %mol : Integer -> SIU
      %cd  : Integer -> SIU                       

      hertz     : SIU
      newton    : SIU
      pascal    : SIU  
      joule     : SIU 
      watt      : SIU 
      coulomb   : SIU
      volt      : SIU
      farad     : SIU
      ohm       : SIU
      siemens   : SIU
      weber     : SIU
      tesla     : SIU
      henry     : SIU
      lumen     : SIU
      lux       : SIU
      becquerel : SIU
      gray      : SIU
      sievert   : SIU
      katal     : SIU

    Implementation ==  SIU add                 
  
      u:=baseUnits()$SIU
    
      %m(n)   == u.1^n
      %kg(n)  == u.2^n
      %s(n)   == u.3^n
      %A(n)   == u.4^n
      %K(n)   == u.5^n
      %mol(n) == u.6^n
      %cd(n)  == u.7^n
                                     
      hertz      ==  %s(-1)
      newton     ==  %kg(1)*%m(1)*%s(-2)
      pascal     ==  %kg(1)*%m(-1)*%s(-2)   
      joule      ==  %kg(1)*%m(2)*%s(-2)
      watt       ==  %kg(1)*%m(2)*%s(-3)
      coulomb    ==  %s(1)*%A(1)
      volt       ==  %kg(1)*%m(2)*%s(-3)*%A(-1)
      farad      ==  %kg(-1)*%m(-2)*%s(4)*%A(2)
      ohm        ==  %kg(1)*%m(2)*%s(-3)*%A(2)
      siemens    ==  %kg(-1)*%m(-2)*%s(3)*%A(2)
      weber      ==  %kg(1)*%m(2)*%s(-2)*%A(-1)
      tesla      ==  %kg(1)*%s(-2)*%A(-1)
      henry      ==  %kg(1)*%m(2)*%s(-2)*%A(-2)
      lumen      ==  %cd(1)
      lux        ==  %m(-2)*%cd(1)
      becquerel  ==  %s(-1)
      gray       ==  %m(2)*%s(-2)
      sievert    ==  %m(2)*%s(-2)
      katal      ==  %s(-1)*%mol(1)    

\end{spad}

\begin{axiom}

SIU:=PUSYS(['m,'kg,'s,'A,'K,'mol,'cd])
u:=baseUnits()$SIU

PSI==>PQTY(SIU)

(interval(1.2)$Interval(Float)) (u.1*u.2^3)
a:=1.233 u.1
b:=2 u.2

sin(ival a) (unit a)

setOutputMode(2)$PSI
a
b
setOutputMode(3)$PSI
a
b
setOutputMode(1)$PSI

F:=4.5555 newton()$SI
A:=300.45 %m(2)$SI
unit(F/A) /pascal()$SI

)show PUNIT
)show PUSYS
)show PQTY

-- cannot show SI (reason? -> SIU)
)show SI
\end{axiom}

spad
)abbrev category PUNIT PhysicalUnit
PhysicalUnit() : Category == with   
    "*"  : (%,%) -> %
    "/"  : (%,%) -> %
    "^"  : (%,Integer) -> %
    "="  : (%,%) -> Boolean
    dim  : % -> List Integer
    one  : %
    coerce : % -> OutputForm
)abbrev domain PUSYS PhysicalUnitSystem PhysicalUnitSystem(u:List Symbol) : Exports == Implementation where BASU ==> OrderedVariableList(u) FAGB ==> FreeModule(Integer,BASU) Exports == Join(PhysicalUnit,CoercibleTo OutputForm) with _* : (%,%) -> % _/ : (%,%) -> % baseSymbols : List Symbol baseUnits : List % factors : % -> List Record(gen: BASU,exp: Integer) Implementation == FreeGroup(BASU) add Rep:=FreeModule(Integer,BASU) sort: % -> % x * y == sort(x+y) x / y == sort(x-y) x ^ n == sort(n*x) one() == 0$Rep baseSymbols() == [convert(x)@Symbol for x in enumerate$BASU] baseUnits() == [x::% for x in enumerate$BASU] dim(x) == d:=[0@Integer for j in 1..#u] lr:List(Record(gen:BASU,exp:Integer)):=factors(x) for r in lr repeat g:BASU:=r.gen k:=position(g,enumerate$BASU)$List(BASU) d.k:=r.exp d
x = y == test(dim x = dim y)
coerce0(x:%):OutputForm == #monomials(x) = 0 => outputForm(1) d:=dim(x) b:=baseSymbols() y:List OutputForm:=[] for j in 1..#d repeat if d.j=1 then y:=concat(y,outputForm(b.j)) else if d.j~=0 then y:=concat(y,outputForm(b.j)^outputForm(d.j)) blankSeparate y
sort(x:%):% == R==>Record(gen: BASU,exp: Integer) f:=(a:R,b:R):Boolean+->(test(a.gen>b.gen)) sort(f,factors x) pretend Rep
-- SI:=PUSYS(['m,'kg,'s]) -- u:=baseUnits()$SI -- coerce0 works as coerce, if sort then not necess.
)abbrev domain PQTY PhysQty PhysQty(U): Exports == Implementation where
Q ==> Fraction(Integer) F ==> Float R ==> DoubleFloat I ==> Integer OF ==> OutputForm PI ==> PositiveInteger IVF ==> Interval Float U:PhysicalUnit
Exports == Join(CoercibleTo OutputForm) with _* : (%,%) -> % _/ : (%,%) -> % _+ : (%,%) -> % _- : (%,%) -> % _^ : (%,Integer) -> % _- : % -> %
ival : % -> IVF unit : % -> U
elt : (IVF,U) -> % elt : (F,U) -> %
setOutputMode : PI -> PI coerce : % -> OutputForm
Implementation == add
Rep := Record(ival:IVF, unit:U)
outputMode:PI:=1
x * y == [x.ival * y.ival, x.unit * y.unit]$Rep x / y == r:Union(IVF,"failed"):=recip(y.ival) r case IVF => [x.ival * r, x.unit / y.unit]$Rep error "failed" x + y == x.unit=y.unit => [x.ival + y.ival, x.unit]$Rep error "failed" x - y == x.unit=y.unit => [x.ival - y.ival, x.unit]$Rep error "failed" x ^ n == n > 0 => [x.ival^n::PI, x.unit^n::PI]$Rep n = 0 => [interval(1.0,1.0)$IVF, one()]$Rep r:Union(IVF,"failed"):=recip(x.ival) m:PI:=(-n)::PI r case IVF => [r^m, x.unit^n]$Rep error "failed"
- x == [-x.ival, x.unit]$Rep
ival x == x.ival unit x == x.unit
elt(v:IVF,u:U):% == [v,u]$Rep elt(v:F,u:U):% == [interval(v)$IVF,u]$Rep
setOutputMode(s:PI):PI == modes:List PI:= [1,2,3] if member?(s,modes) then outputMode := s return s error "1: plusMinus, 2: single, 3: interval"
coerce(x) == pm:Character:=char(177) pmof:=pm::String::Symbol::OF val:Float:=(sup(x.ival)+inf(x.ival))/2 err:Float:=sup(x.ival)-val outputMode=1 => blankSeparate [val::OF,pmof,err::OF,x.unit::OF] outputMode=2 => blankSeparate [val::OF,x.unit::OF] outputMode=3 => blankSeparate [x.ival::OF,x.unit::OF]
)abbrev package SI SIunits SIunits : Exports == Implementation where
USY ==> ['m,'kg,'s,'A,'K,'mol,'cd] SIU ==> PhysicalUnitSystem(USY)
Exports == with
%m : Integer -> SIU %kg : Integer -> SIU %s : Integer -> SIU %A : Integer -> SIU %K : Integer -> SIU %mol : Integer -> SIU %cd : Integer -> SIU
hertz : SIU newton : SIU pascal : SIU joule : SIU watt : SIU coulomb : SIU volt : SIU farad : SIU ohm : SIU siemens : SIU weber : SIU tesla : SIU henry : SIU lumen : SIU lux : SIU becquerel : SIU gray : SIU sievert : SIU katal : SIU
Implementation == SIU add
u:=baseUnits()$SIU
%m(n) == u.1^n %kg(n) == u.2^n %s(n) == u.3^n %A(n) == u.4^n %K(n) == u.5^n %mol(n) == u.6^n %cd(n) == u.7^n
hertz == %s(-1) newton == %kg(1)*%m(1)*%s(-2) pascal == %kg(1)*%m(-1)*%s(-2) joule == %kg(1)*%m(2)*%s(-2) watt == %kg(1)*%m(2)*%s(-3) coulomb == %s(1)*%A(1) volt == %kg(1)*%m(2)*%s(-3)*%A(-1) farad == %kg(-1)*%m(-2)*%s(4)*%A(2) ohm == %kg(1)*%m(2)*%s(-3)*%A(2) siemens == %kg(-1)*%m(-2)*%s(3)*%A(2) weber == %kg(1)*%m(2)*%s(-2)*%A(-1) tesla == %kg(1)*%s(-2)*%A(-1) henry == %kg(1)*%m(2)*%s(-2)*%A(-2) lumen == %cd(1) lux == %m(-2)*%cd(1) becquerel == %s(-1) gray == %m(2)*%s(-2) sievert == %m(2)*%s(-2) katal == %s(-1)*%mol(1)
spad
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/4402353047935237670-25px001.spad
      using old system compiler.
   PUNIT abbreviates category PhysicalUnit 
------------------------------------------------------------------------
   initializing NRLIB PUNIT for PhysicalUnit 
   compiling into NRLIB PUNIT 
;;; *** |PhysicalUnit| REDEFINED Time: 0 SEC.
finalizing NRLIB PUNIT Processing PhysicalUnit for Browser database: --->-->PhysicalUnit(constructor): Not documented!!!! --->-->PhysicalUnit((* (% % %))): Not documented!!!! --->-->PhysicalUnit((/ (% % %))): Not documented!!!! --->-->PhysicalUnit((^ (% % (Integer)))): Not documented!!!! --->-->PhysicalUnit((= ((Boolean) % %))): Not documented!!!! --->-->PhysicalUnit((dim ((List (Integer)) %))): Not documented!!!! --->-->PhysicalUnit((one (%) constant)): Not documented!!!! --->-->PhysicalUnit((coerce ((OutputForm) %))): Not documented!!!! --->-->PhysicalUnit(): Missing Description ; compiling file "/var/aw/var/LatexWiki/PUNIT.NRLIB/PUNIT.lsp" (written 16 JUL 2018 04:38:54 PM):
; /var/aw/var/LatexWiki/PUNIT.NRLIB/PUNIT.fasl written ; compilation finished in 0:00:00.003 ------------------------------------------------------------------------ PhysicalUnit is now explicitly exposed in frame initial PhysicalUnit will be automatically loaded when needed from /var/aw/var/LatexWiki/PUNIT.NRLIB/PUNIT
PUSYS abbreviates domain PhysicalUnitSystem ------------------------------------------------------------------------ initializing NRLIB PUSYS for PhysicalUnitSystem compiling into NRLIB PUSYS compiling exported * : ($,$) -> $ Time: 0.02 SEC.
compiling exported / : ($,$) -> $ Time: 0.01 SEC.
compiling exported ^ : ($,Integer) -> $ Time: 0 SEC.
compiling exported one : () -> $ Time: 0 SEC.
compiling exported baseSymbols : () -> List Symbol Time: 0 SEC.
compiling exported baseUnits : () -> List $ Time: 0 SEC.
compiling exported dim : $ -> List Integer Time: 0.02 SEC.
compiling exported = : ($,$) -> Boolean Time: 0.01 SEC.
compiling local coerce0 : $ -> OutputForm Time: 0.08 SEC.
compiling local sort : $ -> $ processing macro definition R ==> Record(gen: OrderedVariableList u,exp: Integer) Time: 0.01 SEC.
(time taken in buildFunctor: 0)
;;; *** |PhysicalUnitSystem| REDEFINED
;;; *** |PhysicalUnitSystem| REDEFINED Time: 0 SEC.
Warnings: [1] dim: gen has no value [2] dim: exp has no value [3] coerce0: y has no value [4] sort: gen has no value
Cumulative Statistics for Constructor PhysicalUnitSystem Time: 0.15 seconds
--------------non extending category---------------------- .. PhysicalUnitSystem(#1) of cat (|Join| (|PhysicalUnit|) (|CoercibleTo| (|OutputForm|)) (CATEGORY |domain| (SIGNATURE * ($ $ $)) (SIGNATURE / ($ $ $)) (SIGNATURE |baseSymbols| ((|List| (|Symbol|))) |constant|) (SIGNATURE |baseUnits| ((|List| $)) |constant|) (SIGNATURE |factors| ((|List| (|Record| (|:| |gen| (|OrderedVariableList| |#1|)) (|:| |exp| (|Integer|)))) $)))) has no (|Group|) finalizing NRLIB PUSYS Processing PhysicalUnitSystem for Browser database: --->-->PhysicalUnitSystem(constructor): Not documented!!!! --->-->PhysicalUnitSystem((* (% % %))): Not documented!!!! --->-->PhysicalUnitSystem((/ (% % %))): Not documented!!!! --->-->PhysicalUnitSystem((baseSymbols ((List (Symbol))) constant)): Not documented!!!! --->-->PhysicalUnitSystem((baseUnits ((List %)) constant)): Not documented!!!! --->-->PhysicalUnitSystem((factors ((List (Record (: gen (OrderedVariableList u)) (: exp (Integer)))) %))): Not documented!!!! --->-->PhysicalUnitSystem(): Missing Description ; compiling file "/var/aw/var/LatexWiki/PUSYS.NRLIB/PUSYS.lsp" (written 16 JUL 2018 04:38:55 PM):
; /var/aw/var/LatexWiki/PUSYS.NRLIB/PUSYS.fasl written ; compilation finished in 0:00:00.045 ------------------------------------------------------------------------ PhysicalUnitSystem is now explicitly exposed in frame initial PhysicalUnitSystem will be automatically loaded when needed from /var/aw/var/LatexWiki/PUSYS.NRLIB/PUSYS
PQTY abbreviates domain PhysQty ------------------------------------------------------------------------ initializing NRLIB PQTY for PhysQty compiling into NRLIB PQTY Local variable Rep type redefined: (Join (SetCategory) (CATEGORY domain (SIGNATURE construct ((Record (: ival (Interval (Float))) (: unit U)) (Interval (Float)) U)) (SIGNATURE ~= ((Boolean) (Record (: ival (Interval (Float))) (: unit U)) (Record (: ival (Interval (Float))) (: unit U)))) (SIGNATURE coerce ((OutputForm) (Record (: ival (Interval (Float))) (: unit U)))) (SIGNATURE elt ((Interval (Float)) (Record (: ival (Interval (Float))) (: unit U)) ival)) (SIGNATURE elt (U (Record (: ival (Interval (Float))) (: unit U)) unit)) (SIGNATURE setelt! ((Interval (Float)) (Record (: ival (Interval (Float))) (: unit U)) ival (Interval (Float)))) (SIGNATURE setelt! (U (Record (: ival (Interval (Float))) (: unit U)) unit U)) (SIGNATURE copy ((Record (: ival (Interval (Float))) (: unit U)) (Record (: ival (Interval (Float))) (: unit U)))))) to (Join (BiModule (Integer) (Integer)) (FreeModuleCategory (Integer) (OrderedVariableList u)) (CATEGORY package (IF (has (Integer) (CommutativeRing)) (ATTRIBUTE (Module (Integer))) noBranch))) compiling exported * : ($,$) -> $ Time: 0.02 SEC.
compiling exported / : ($,$) -> $ Time: 0 SEC.
compiling exported + : ($,$) -> $ Time: 0 SEC.
compiling exported - : ($,$) -> $ Time: 0 SEC.
compiling exported ^ : ($,Integer) -> $ Time: 0 SEC.
compiling exported - : $ -> $ Time: 0.01 SEC.
compiling exported ival : $ -> Interval Float PQTY;ival;$I;7 is replaced by QCAR Time: 0 SEC.
compiling exported unit : $ -> U PQTY;unit;$U;8 is replaced by QCDR Time: 0 SEC.
compiling exported elt : (Interval Float,U) -> $ PQTY;elt;IU$;9 is replaced by CONS Time: 0 SEC.
compiling exported elt : (Float,U) -> $ Time: 0 SEC.
compiling exported setOutputMode : PositiveInteger -> PositiveInteger Time: 0 SEC.
compiling exported coerce : $ -> OutputForm Time: 0.02 SEC.
(time taken in buildFunctor: 0)
;;; *** |PhysQty| REDEFINED
;;; *** |PhysQty| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor PhysQty Time: 0.05 seconds
finalizing NRLIB PQTY Processing PhysQty for Browser database: --->-->PhysQty(constructor): Not documented!!!! --->-->PhysQty((* (% % %))): Not documented!!!! --->-->PhysQty((/ (% % %))): Not documented!!!! --->-->PhysQty((+ (% % %))): Not documented!!!! --->-->PhysQty((- (% % %))): Not documented!!!! --->-->PhysQty((^ (% % (Integer)))): Not documented!!!! --->-->PhysQty((- (% %))): Not documented!!!! --->-->PhysQty((ival ((Interval (Float)) %))): Not documented!!!! --->-->PhysQty((unit (U %))): Not documented!!!! --->-->PhysQty((elt (% (Interval (Float)) U))): Not documented!!!! --->-->PhysQty((elt (% (Float) U))): Not documented!!!! --->-->PhysQty((setOutputMode ((PositiveInteger) (PositiveInteger)))): Not documented!!!! --->-->PhysQty((coerce ((OutputForm) %))): Not documented!!!! --->-->PhysQty(): Missing Description ; compiling file "/var/aw/var/LatexWiki/PQTY.NRLIB/PQTY.lsp" (written 16 JUL 2018 04:38:55 PM):
; /var/aw/var/LatexWiki/PQTY.NRLIB/PQTY.fasl written ; compilation finished in 0:00:00.046 ------------------------------------------------------------------------ PhysQty is now explicitly exposed in frame initial PhysQty will be automatically loaded when needed from /var/aw/var/LatexWiki/PQTY.NRLIB/PQTY
SI abbreviates package SIunits ------------------------------------------------------------------------ initializing NRLIB SI for SIunits compiling into NRLIB SI compiling exported %m : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported %kg : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported %s : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported %A : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported %K : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0.01 SEC.
compiling exported %mol : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported %cd : Integer -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported hertz : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported newton : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported pascal : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported joule : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported watt : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported coulomb : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported volt : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0.01 SEC.
compiling exported farad : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported ohm : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported siemens : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported weber : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported tesla : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported henry : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported lumen : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported lux : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0.01 SEC.
compiling exported becquerel : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported gray : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported sievert : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
compiling exported katal : () -> PhysicalUnitSystem construct(QUOTE m,QUOTE kg,QUOTE s,QUOTE A,QUOTE K,QUOTE mol,QUOTE cd) Time: 0 SEC.
(time taken in buildFunctor: 0)
;;; *** |SIunits| REDEFINED
;;; *** |SIunits| REDEFINED Time: 0 SEC.
Cumulative Statistics for Constructor SIunits Time: 0.03 seconds
--------------non extending category---------------------- .. SIunits of cat (CATEGORY |package| (SIGNATURE |%m| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE |%kg| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE |%s| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE %A ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE %K ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE |%mol| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE |%cd| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|))) (SIGNATURE |hertz| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |newton| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |pascal| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |joule| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |watt| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |coulomb| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |volt| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |farad| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |ohm| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |siemens| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |weber| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |tesla| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |henry| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |lumen| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |lux| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |becquerel| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |gray| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |sievert| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|) (SIGNATURE |katal| ((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|))) |constant|)) has no (|PhysicalUnit|) finalizing NRLIB SI Processing SIunits for Browser database: --->-->SIunits(constructor): Not documented!!!! --->-->SIunits( PhysicalUnitSystem(['m, 'kg, 's, 'A, 'K, 'mol, 'cd])(Integer())() ): Not documented!!!! --->-->SIunits((%kg ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd))) (Integer)))): Not documented!!!! --->-->SIunits((((|PhysicalUnitSystem| (|construct| '|m| '|kg| '|s| 'A 'K '|mol| '|cd|)) (|Integer|)))): Not documented!!!! --->-->SIunits((%A ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd))) (Integer)))): Not documented!!!! --->-->SIunits((%K ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd))) (Integer)))): Not documented!!!! --->-->SIunits((%mol ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd))) (Integer)))): Not documented!!!! --->-->SIunits((%cd ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd))) (Integer)))): Not documented!!!! --->-->SIunits((hertz ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((newton ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((pascal ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((joule ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((watt ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((coulomb ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((volt ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((farad ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((ohm ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((siemens ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((weber ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((tesla ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((henry ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((lumen ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((lux ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((becquerel ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((gray ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((sievert ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits((katal ((PhysicalUnitSystem (construct (QUOTE m) (QUOTE kg) (QUOTE s) (QUOTE A) (QUOTE K) (QUOTE mol) (QUOTE cd)))) constant)): Not documented!!!! --->-->SIunits(): Missing Description ; compiling file "/var/aw/var/LatexWiki/SI.NRLIB/SI.lsp" (written 16 JUL 2018 04:38:55 PM):
; /var/aw/var/LatexWiki/SI.NRLIB/SI.fasl written ; compilation finished in 0:00:00.070 ------------------------------------------------------------------------ SIunits is now explicitly exposed in frame initial SIunits will be automatically loaded when needed from /var/aw/var/LatexWiki/SI.NRLIB/SI

fricas
SIU:=PUSYS(['m,'kg,'s,'A,'K,'mol,'cd])

\label{eq1}\hbox{\axiomType{PhysicalUnitSystem}\ } ([ m , kg , s , A , K , mol , cd ])(1)
Type: Type
fricas
u:=baseUnits()$SIU

\label{eq2}\left[ m , \: kg , \: s , \: A , \: K , \: mol , \: cd \right](2)
Type: List(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
PSI==>PQTY(SIU)
Type: Void
fricas
(interval(1.2)$Interval(Float)) (u.1*u.2^3)

\label{eq3}{1.2}\  �� \ {0.7 E - 20}\ {m \ {{kg}^{3}}}(3)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
a:=1.233 u.1

\label{eq4}{1.233}\  �� \ {0.7 E - 20}\  m(4)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
b:=2 u.2

\label{eq5}{2.0}\  �� \ {0.0}\  kg(5)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
sin(ival a) (unit a)

\label{eq6}{0.9434872724 \_ 125741287}\  �� \ {0.7 E - 20}\  m(6)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
setOutputMode(2)$PSI

\label{eq7}2(7)
Type: PositiveInteger?
fricas
a

\label{eq8}{1.233}\  m(8)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
b

\label{eq9}{2.0}\  kg(9)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
setOutputMode(3)$PSI

\label{eq10}3(10)
Type: PositiveInteger?
fricas
a

\label{eq11}{\left[{1.233}, \:{1.233}\right]}\  m(11)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
b

\label{eq12}{\left[{2.0}, \:{2.0}\right]}\  kg(12)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
setOutputMode(1)$PSI

\label{eq13}1(13)
Type: PositiveInteger?
fricas
F:=4.5555 newton()$SI

\label{eq14}{4.5555}\  �� \ {0.3 E - 19}\ {m \  kg \ {{s}^{- 2}}}(14)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
A:=300.45 %m(2)$SI

\label{eq15}{300.45}\  �� \ {0.2 E - 17}\ {{m}^{2}}(15)
Type: PhysQty?(PhysicalUnitSystem?([m,kg,s,A,K,mol,cd]))
fricas
unit(F/A) /pascal()$SI

\label{eq16}1(16)
Type: PhysicalUnitSystem?([m,kg,s,A,K,mol,cd])
fricas
)show PUNIT
PhysicalUnit is a category constructor Abbreviation for PhysicalUnit is PUNIT This constructor is exposed in this frame. ------------------------------- Operations --------------------------------
?*? : (%, %) -> % ?/? : (%, %) -> % ?=? : (%, %) -> Boolean ?^? : (%, Integer) -> % coerce : % -> OutputForm dim : % -> List(Integer) one : () -> %
fricas
)show PUSYS
PhysicalUnitSystem(u: List(Symbol)) is a domain constructor Abbreviation for PhysicalUnitSystem is PUSYS This constructor is exposed in this frame. ------------------------------- Operations --------------------------------
?*? : (%, %) -> % ?/? : (%, %) -> % ?=? : (%, %) -> Boolean ?^? : (%, Integer) -> % baseSymbols : () -> List(Symbol) baseUnits : () -> List(%) coerce : % -> OutputForm dim : % -> List(Integer) one : () -> % factors : % -> List(Record(gen: OrderedVariableList(u),exp: Integer))
fricas
)show PQTY
PhysQty(U: PhysicalUnit) is a domain constructor Abbreviation for PhysQty is PQTY This constructor is exposed in this frame. ------------------------------- Operations --------------------------------
?*? : (%, %) -> % ?+? : (%, %) -> % -? : % -> % ?-? : (%, %) -> % ?/? : (%, %) -> % ?^? : (%, Integer) -> % coerce : % -> OutputForm elt : (Float, U) -> % elt : (Interval(Float), U) -> % ival : % -> Interval(Float) unit : % -> U setOutputMode : PositiveInteger -> PositiveInteger
-- cannot show SI (reason? -> SIU)
fricas
)show SI
SIunits is a package constructor Abbreviation for SIunits is SI This constructor is exposed in this frame. ------------------------------- Operations --------------------------------
>> Error detected within library code: index out of range