FAQ
When I try:

package main

import (
     "fmt"
     "math/big"
)

func main() {
     x := big.Exp(2, 10)
     fmt.Println(x)
}


I get the error "undefined: big.Exp". Using just the "math" package, I
would use x := math.Pow(2, 10).

Thanks

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Ian Lance Taylor at Nov 23, 2013 at 12:55 am

    On Fri, Nov 22, 2013 at 4:49 PM, wrote:
    When I try:

    package main

    import (
    "fmt"
    "math/big"
    )

    func main() {
    x := big.Exp(2, 10)
    fmt.Println(x)
    }


    I get the error "undefined: big.Exp". Using just the "math" package, I
    would use x := math.Pow(2, 10).
    Exp is a method.

    http://play.golang.org/p/iQWrjUiKXX

    Ian

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Spython01 at Nov 23, 2013 at 2:40 am
    Thanks, Ian. I'm struggling to manipulate the result further since it
    doesn't seem to work the same as an int so I may come back with more
    questions.
    On Friday, November 22, 2013 7:55:28 PM UTC-5, Ian Lance Taylor wrote:

    On Fri, Nov 22, 2013 at 4:49 PM, <spyt...@gmail.com <javascript:>>
    wrote:
    When I try:

    package main

    import (
    "fmt"
    "math/big"
    )

    func main() {
    x := big.Exp(2, 10)
    fmt.Println(x)
    }


    I get the error "undefined: big.Exp". Using just the "math" package, I
    would use x := math.Pow(2, 10).
    Exp is a method.

    http://play.golang.org/p/iQWrjUiKXX

    Ian
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 23, '13 at 12:51a
activeNov 23, '13 at 2:40a
posts3
users2
websitegolang.org

2 users in discussion

Spython01: 2 posts Ian Lance Taylor: 1 post

People

Translate

site design / logo © 2022 Grokbase