github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library@v0.2.0/Power/Power.go (about)

     1  // Package Power
     2  // Dafny module Power compiled into Go
     3  
     4  package Power
     5  
     6  import (
     7  	os "os"
     8  
     9  	m_BoundedInts "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/BoundedInts"
    10  	m_DivInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivInternals"
    11  	m_DivInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivInternalsNonlinear"
    12  	m_DivMod "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivMod"
    13  	m_FileIO "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/FileIO"
    14  	m_Functions "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Functions"
    15  	m_GeneralInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/GeneralInternals"
    16  	m__Math "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Math_"
    17  	m_ModInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/ModInternals"
    18  	m_ModInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/ModInternalsNonlinear"
    19  	m_Mul "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Mul"
    20  	m_MulInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/MulInternals"
    21  	m_MulInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/MulInternalsNonlinear"
    22  	m_Relations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Relations"
    23  	m_Seq "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq"
    24  	m_Seq_MergeSort "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq_MergeSort"
    25  	m_UnicodeStrings "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/UnicodeStrings"
    26  	m__Unicode "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Unicode_"
    27  	m_Utf16EncodingForm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Utf16EncodingForm"
    28  	m_Utf8EncodingForm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Utf8EncodingForm"
    29  	m_Wrappers "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Wrappers"
    30  	m__System "github.com/dafny-lang/DafnyRuntimeGo/v4/System_"
    31  	_dafny "github.com/dafny-lang/DafnyRuntimeGo/v4/dafny"
    32  )
    33  
    34  var _ = os.Args
    35  var _ _dafny.Dummy__
    36  var _ m__System.Dummy__
    37  var _ m_Wrappers.Dummy__
    38  var _ m_Relations.Dummy__
    39  var _ m_Seq_MergeSort.Dummy__
    40  var _ m__Math.Dummy__
    41  var _ m_Seq.Dummy__
    42  var _ m_BoundedInts.Dummy__
    43  var _ m__Unicode.Dummy__
    44  var _ m_Functions.Dummy__
    45  var _ m_Utf8EncodingForm.Dummy__
    46  var _ m_Utf16EncodingForm.Dummy__
    47  var _ m_UnicodeStrings.Dummy__
    48  var _ m_FileIO.Dummy__
    49  var _ m_GeneralInternals.Dummy__
    50  var _ m_MulInternalsNonlinear.Dummy__
    51  var _ m_MulInternals.Dummy__
    52  var _ m_Mul.Dummy__
    53  var _ m_ModInternalsNonlinear.Dummy__
    54  var _ m_DivInternalsNonlinear.Dummy__
    55  var _ m_ModInternals.Dummy__
    56  var _ m_DivInternals.Dummy__
    57  var _ m_DivMod.Dummy__
    58  
    59  type Dummy__ struct{}
    60  
    61  // Definition of class Default__
    62  type Default__ struct {
    63  	dummy byte
    64  }
    65  
    66  func New_Default___() *Default__ {
    67  	_this := Default__{}
    68  
    69  	return &_this
    70  }
    71  
    72  type CompanionStruct_Default___ struct {
    73  }
    74  
    75  var Companion_Default___ = CompanionStruct_Default___{}
    76  
    77  func (_this *Default__) Equals(other *Default__) bool {
    78  	return _this == other
    79  }
    80  
    81  func (_this *Default__) EqualsGeneric(x interface{}) bool {
    82  	other, ok := x.(*Default__)
    83  	return ok && _this.Equals(other)
    84  }
    85  
    86  func (*Default__) String() string {
    87  	return "Power.Default__"
    88  }
    89  func (_this *Default__) ParentTraits_() []*_dafny.TraitID {
    90  	return [](*_dafny.TraitID){}
    91  }
    92  
    93  var _ _dafny.TraitOffspring = &Default__{}
    94  
    95  func (_static *CompanionStruct_Default___) Pow(b _dafny.Int, e _dafny.Int) _dafny.Int {
    96  	var _0___accumulator _dafny.Int = _dafny.One
    97  	_ = _0___accumulator
    98  	goto TAIL_CALL_START
    99  TAIL_CALL_START:
   100  	if (e).Sign() == 0 {
   101  		return (_dafny.One).Times(_0___accumulator)
   102  	} else {
   103  		_0___accumulator = (_0___accumulator).Times(b)
   104  		var _in0 _dafny.Int = b
   105  		_ = _in0
   106  		var _in1 _dafny.Int = (e).Minus(_dafny.One)
   107  		_ = _in1
   108  		b = _in0
   109  		e = _in1
   110  		goto TAIL_CALL_START
   111  	}
   112  }
   113  
   114  // End of class Default__