next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
SLPexpressions :: SLPexpressions

SLPexpressions -- Straight Line Programs and expressions for evaluation circuits

Description

i1 : X = inputGate x

o1 = x

o1 : InputGate
i2 : f = X + 1

o2 = (x + 1)

o2 : SumGate
i3 : n = 12;
i4 : for i from 1 to n do f = f*f -- f = (x+1)^(2^n)
i5 : time A = value(f,valueHashTable({X},{1}))  
     -- used 0.000036272 seconds

o5 = 104438888141315250669175271071662438257996424904738378038423348328395390
     797155745684882681193499755834089010671443926283798757343818579360726323
     608785136527794595697654370999834036159013438371831442807001185594622637
     631883939771274567233468434458661749680790870580370407128404874011860911
     446797778359802900668693897688178778594690563019026094059957945343282346
     930302669644305902501597239986771421554169383555988529148631823791443449
     673408781187263949647510018904134900841706167509366833385055103297208826
     955076998361636941193301521379682583718809183365675122131849284636812555
     022599830041234478486259567449219461702380650591324561082573183538008760
     862210283427019769820231316901767800667519548507992163641937028537512478
     401490715913545998279051339961155179427110683113409058427288427979155484
     978295432353451706522326906139490598769300212296339568778287894844061600
     741294567491982305057164237715481632138063104590291613692670834285644073
     044789997190178146576347322385026725305989979599609079946920177462481771
     844986745565925017832907047311943316555080756822184657174637329688491281
     952031745700244092661691087414838507841192980452298185733897764810312608
     590300130241346718972667321649151113160292078173803343609024380470834040
     3154190336
i6 : ZZ[y];
i7 : time B = sub((y+1)^(2^n),{y=>1})    
     -- used 4.40709 seconds

o7 = 104438888141315250669175271071662438257996424904738378038423348328395390
     797155745684882681193499755834089010671443926283798757343818579360726323
     608785136527794595697654370999834036159013438371831442807001185594622637
     631883939771274567233468434458661749680790870580370407128404874011860911
     446797778359802900668693897688178778594690563019026094059957945343282346
     930302669644305902501597239986771421554169383555988529148631823791443449
     673408781187263949647510018904134900841706167509366833385055103297208826
     955076998361636941193301521379682583718809183365675122131849284636812555
     022599830041234478486259567449219461702380650591324561082573183538008760
     862210283427019769820231316901767800667519548507992163641937028537512478
     401490715913545998279051339961155179427110683113409058427288427979155484
     978295432353451706522326906139490598769300212296339568778287894844061600
     741294567491982305057164237715481632138063104590291613692670834285644073
     044789997190178146576347322385026725305989979599609079946920177462481771
     844986745565925017832907047311943316555080756822184657174637329688491281
     952031745700244092661691087414838507841192980452298185733897764810312608
     590300130241346718972667321649151113160292078173803343609024380470834040
     3154190336
i8 : A == B

o8 = true

See also

Author

Version

This documentation describes version 1.9.3 of SLPexpressions.

Source code

The source code from which this documentation is derived is in the file SLPexpressions.m2. The auxiliary files accompanying it are in the directory SLPexpressions/.

Exports

  • Types
    • Gate -- an expression that is a part of an evaluation circuit (abstract type)
    • InputGate, see Gate -- an expression that is a part of an evaluation circuit (abstract type)
    • ProductGate, see Gate -- an expression that is a part of an evaluation circuit (abstract type)
    • SumGate, see Gate -- an expression that is a part of an evaluation circuit (abstract type)
    • GateMatrix -- a matrix of Gates
  • Functions and commands
  • Methods
    • cCode(GateMatrix,GateMatrix) (missing documentation)
  • Other things
    • minusOneGate (missing documentation)
    • oneGate (missing documentation)
    • zeroGate (missing documentation)