Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Tag: golang

Generate Random number in Go (Golang)

Posted on March 28, 2020April 8, 2020 by admin

Overview Go provide a ‘math/rand’ package which has inbuilt support for generating pseudo-random numbers. This package defines methods which can be used to generate A pseudo-random number within the range from 0…

Max of two numbers in Go (Golang)

Posted on March 28, 2020March 28, 2020 by admin

Overview math package of GO provides a Max method that can be used to get the maximum of two numbers. Below is the signature of the function. It takes input two float…

Min of two numbers in Go (Golang)

Posted on March 28, 2020March 28, 2020 by admin

Overview math package of GO provides a Min method that can be used to get the minimum of two numbers. The Below is the signature of the function. It takes input two…

Check if a number is negative or positive in Go (Golang)

Posted on March 28, 2020March 28, 2020 by admin

Overview math package of GO provides a Signbit method that can be used to check whether a given number is negative or positive. It returns true for a negative number It returns…

Calculate x^y – Pow() in Go (Golang)

Posted on March 28, 2020March 28, 2020 by admin

Overview math package of GO provides a Pow method that can be used to calculate x to the power y. Below is the signature of the function. It takes input as two…

Square Root of a number in Go (Golang)

Posted on March 26, 2020March 26, 2020 by admin

Overview math package of GO provides a Sqrt method that can be used to get the cube root of that number. Below is the signature of the function. It takes input a…

Pi value in Go (Golang)

Posted on March 26, 2020March 26, 2020 by admin

Overview math package of GO provides a Pi constant. This is how it is defined in the constant.go file of math package. It is a float64 value Code: Output:

Round a number in Go (Golang)

Posted on March 25, 2020March 25, 2020 by admin

Overview math package of GO provides a Round method that can be used to round a number. It returns the nearest integer value. Below is the signature of the function. It takes…

Get Integer value of a float in Go (Golang)

Posted on March 25, 2020March 25, 2020 by admin

Overview math package of GO provides a Trunc method that can be used to get integer value of a float Below is the signature of the function. It takes input a float…

Ceil of a number in Go (Golang)

Posted on March 25, 2020March 25, 2020 by admin

Overview math package of GO provides a Ceil method that can be used to get the ceil of a number. Ceil of a number is the least integer value greater than or…

Posts pagination

Previous 1 … 35 36 37 … 41 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme