OXIESEC PANEL
- Current Dir:
/
/
opt
/
golang
/
1.22.0
/
src
/
strconv
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/02/2024 06:09:55 PM
rwxr-xr-x
📄
atob.go
974 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
atob_test.go
1.87 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atoc.go
3.04 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atoc_test.go
6.83 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atof.go
15.9 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atof_test.go
23.56 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atoi.go
8.61 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
atoi_test.go
17.09 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
bytealg.go
389 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
bytealg_bootstrap.go
401 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
ctoa.go
1 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ctoa_test.go
1.45 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
decimal.go
11.03 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
decimal_test.go
3.01 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
doc.go
1.91 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
eisel_lemire.go
41.39 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
example_test.go
8.87 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
export_test.go
240 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
fp_test.go
2.9 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ftoa.go
13.88 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ftoa_test.go
9.33 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ftoaryu.go
15.66 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
ftoaryu_test.go
759 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
internal_test.go
618 bytes
02/02/2024 06:09:55 PM
rw-r--r--
📄
isprint.go
11.55 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
itoa.go
5.3 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
itoa_test.go
5.83 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
makeisprint.go
4.81 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
quote.go
16.79 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
quote_test.go
9.57 KB
02/02/2024 06:09:55 PM
rw-r--r--
📄
strconv_test.go
4.69 KB
02/02/2024 06:09:55 PM
rw-r--r--
📁
testdata
-
02/02/2024 06:09:55 PM
rwxr-xr-x
Editing: ctoa.go
Close
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package strconv // FormatComplex converts the complex number c to a string of the // form (a+bi) where a and b are the real and imaginary parts, // formatted according to the format fmt and precision prec. // // The format fmt and precision prec have the same meaning as in FormatFloat. // It rounds the result assuming that the original was obtained from a complex // value of bitSize bits, which must be 64 for complex64 and 128 for complex128. func FormatComplex(c complex128, fmt byte, prec, bitSize int) string { if bitSize != 64 && bitSize != 128 { panic("invalid bitSize") } bitSize >>= 1 // complex64 uses float32 internally // Check if imaginary part has a sign. If not, add one. im := FormatFloat(imag(c), fmt, prec, bitSize) if im[0] != '+' && im[0] != '-' { im = "+" + im } return "(" + FormatFloat(real(c), fmt, prec, bitSize) + im + "i)" }