Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/escomma/examples/ex7.hs

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--------------------------------------------------------------------------------
import AC
import Circuit

circuit :: [([Int], [Double])]
circuit = [ res 1 2 1000.0,
            res 2 0 1000.0,
            res 1 0 1000.0,
            cap 2 0 0.00001,
            vac 1 0 1.0
          ] 

main = acCalc circuit [1000.0]

{-
array (1,3) [(1,1.0 :+ 0.0),(2,0.000506093138653273 :+ (-0.0158993848642532)),(3,(-0.00199949390686135) :+ (-1.58993848642532e-05))]

-}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.