// File: Mariotti94[P]BigFloat/BigFloat.cc
// Function: BigFloat::Exp[abi:cxx11]() const
std::string BigFloat::Exp() const
{
    std::stringstream out;
    if(error) {
        out << "nan";
        return out.str();
    }

    int check = BigFloat::CompareNum(*this, BigFloat(1));
    if(check == 0) {
        out << sign;
        out << "1e+0";
    }
    if(check == 1) {
        out << sign;
        int i = number.size() - 1;
        out << number[i];
        i--;
        if(i > 0) {
            out << '.';
            for(; (i >= (int)number.size() - 6) && (i >= 0); --i) {
                out << number[i];
            }
        }
        out << "e+" << Ints() - 1;
    }
    if(check == 2) {
        int exp = 0;
        int count = number.size() - 1;
        while(number[count] == '0' && count > 0) {
            count--;
            exp++;
        }
        if(count == 0)
            if(number[count] == '0')
                out << "+0";
            else
                out << sign << number[count] << "e-" << exp;
        else {
            out << sign << number[count] << '.';
            for(int i = count - 1; (i >= (int)count - 5) && (i >= 0); --i) {
                out << number[i];
            }
            out << "e-" << exp;
        }
    }
    return out.str();
}

// Assembly:
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, 0x80(%rsp)
movq %rdi, %rax
movq %rax, 0x88(%rsp)
movq %rdi, 0x2d0(%rsp)
movq %rsi, 0x2c8(%rsp)
movq 0x2c8(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x2120
movq 0x90(%rsp), %rax
testb $0x1, 0x5c(%rax)
je 0xaf6b
leaq 0x150(%rsp), %rdi
leaq 0x514a(%rip), %rsi      # 0x1006e
callq 0x21d0
jmp 0xaf2b
movq 0x80(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x21c0
jmp 0xaf42
movl $0x1, 0x130(%rsp)
jmp 0xb435
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xb452
leaq 0xa8(%rsp), %rdi
movl $0x1, %esi
callq 0x27b0
jmp 0xaf7f
movq 0x90(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x4590
movl %eax, 0x7c(%rsp)
jmp 0xaf9a
leaq 0xa8(%rsp), %rdi
callq 0x2780
movl 0x7c(%rsp), %eax
movl %eax, 0x12c(%rsp)
cmpl $0x0, 0x12c(%rsp)
jne 0xb014
movq 0x90(%rsp), %rax
leaq 0x150(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
jmp 0xafd6
leaq 0x150(%rsp), %rdi
leaq 0x5092(%rip), %rsi      # 0x10077
callq 0x21d0
jmp 0xafec
jmp 0xb014
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x2780
jmp 0xb452
cmpl $0x1, 0x12c(%rsp)
jne 0xb197
movq 0x90(%rsp), %rax
leaq 0x150(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
jmp 0xb03c
movq 0x90(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x68(%rsp)
callq 0x35c0
movq 0x68(%rsp), %rdi
decl %eax
movl %eax, 0xa4(%rsp)
leaq 0x150(%rsp), %rax
movq %rax, 0x70(%rsp)
movslq 0xa4(%rsp), %rsi
callq 0xb510
movq 0x70(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
jmp 0xb089
movl 0xa4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xa4(%rsp)
cmpl $0x0, 0xa4(%rsp)
jle 0xb155
leaq 0x150(%rsp), %rdi
movl $0x2e, %esi
callq 0x2230
jmp 0xb0bc
jmp 0xb0be
movq 0x90(%rsp), %rdi
movl 0xa4(%rsp), %eax
movl %eax, 0x60(%rsp)
addq $0x8, %rdi
callq 0x35c0
movl 0x60(%rsp), %ecx
movl %eax, %edx
subl $0x6, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, 0x67(%rsp)
jl 0xb0fc
cmpl $0x0, 0xa4(%rsp)
setge %al
movb %al, 0x67(%rsp)
movb 0x67(%rsp), %al
testb $0x1, %al
jne 0xb106
jmp 0xb153
movq 0x90(%rsp), %rdi
leaq 0x150(%rsp), %rax
movq %rax, 0x58(%rsp)
addq $0x8, %rdi
movslq 0xa4(%rsp), %rsi
callq 0xb510
movq 0x58(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
jmp 0xb13b
jmp 0xb13d
movl 0xa4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xa4(%rsp)
jmp 0xb0be
jmp 0xb155
leaq 0x150(%rsp), %rdi
leaq 0x4f18(%rip), %rsi      # 0x1007c
callq 0x21d0
movq %rax, 0x50(%rsp)
jmp 0xb170
movq 0x90(%rsp), %rdi
callq 0x29c0
movl %eax, 0x4c(%rsp)
jmp 0xb183
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
decl %esi
callq 0x22f0
jmp 0xb195
jmp 0xb197
cmpl $0x2, 0x12c(%rsp)
jne 0xb413
movq 0x90(%rsp), %rdi
movl $0x0, 0xa0(%rsp)
addq $0x8, %rdi
callq 0x35c0
subq $0x1, %rax
movl %eax, 0x9c(%rsp)
movq 0x90(%rsp), %rdi
addq $0x8, %rdi
movslq 0x9c(%rsp), %rsi
callq 0xb510
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, 0x4b(%rsp)
jne 0xb202
cmpl $0x0, 0x9c(%rsp)
setg %al
movb %al, 0x4b(%rsp)
movb 0x4b(%rsp), %al
testb $0x1, %al
jne 0xb20c
jmp 0xb230
movl 0x9c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x9c(%rsp)
movl 0xa0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa0(%rsp)
jmp 0xb1cc
cmpl $0x0, 0x9c(%rsp)
jne 0xb2f5
movq 0x90(%rsp), %rdi
addq $0x8, %rdi
movslq 0x9c(%rsp), %rsi
callq 0xb510
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0xb277
leaq 0x150(%rsp), %rdi
leaq 0x4e0b(%rip), %rsi      # 0x10079
callq 0x21d0
jmp 0xb275
jmp 0xb2f0
movq 0x90(%rsp), %rax
leaq 0x150(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
movq %rax, 0x40(%rsp)
jmp 0xb296
movq 0x90(%rsp), %rdi
addq $0x8, %rdi
movslq 0x9c(%rsp), %rsi
callq 0xb510
movq 0x40(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
movq %rax, 0x38(%rsp)
jmp 0xb2c3
movq 0x38(%rsp), %rdi
leaq 0x4db0(%rip), %rsi      # 0x1007f
callq 0x21d0
movq %rax, 0x30(%rsp)
jmp 0xb2db
movq 0x30(%rsp), %rdi
movl 0xa0(%rsp), %esi
callq 0x22f0
jmp 0xb2ee
jmp 0xb2f0
jmp 0xb411
movq 0x90(%rsp), %rax
leaq 0x150(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
movq %rax, 0x28(%rsp)
jmp 0xb314
movq 0x90(%rsp), %rdi
addq $0x8, %rdi
movslq 0x9c(%rsp), %rsi
callq 0xb510
movq 0x28(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
movq %rax, 0x20(%rsp)
jmp 0xb341
movq 0x20(%rsp), %rdi
movl $0x2e, %esi
callq 0x2230
jmp 0xb352
movl 0x9c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x98(%rsp)
movl 0x98(%rsp), %ecx
movl 0x9c(%rsp), %edx
subl $0x5, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, 0x1f(%rsp)
jl 0xb38d
cmpl $0x0, 0x98(%rsp)
setge %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0xb397
jmp 0xb3e1
movq 0x90(%rsp), %rdi
leaq 0x150(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x8, %rdi
movslq 0x98(%rsp), %rsi
callq 0xb510
movq 0x10(%rsp), %rdi
movsbl (%rax), %esi
callq 0x2230
jmp 0xb3cc
jmp 0xb3ce
movl 0x98(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0xb363
leaq 0x150(%rsp), %rdi
leaq 0x4c8f(%rip), %rsi      # 0x1007f
callq 0x21d0
movq %rax, 0x8(%rsp)
jmp 0xb3fc
movq 0x8(%rsp), %rdi
movl 0xa0(%rsp), %esi
callq 0x22f0
jmp 0xb40f
jmp 0xb411
jmp 0xb413
movq 0x80(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x21c0
jmp 0xb42a
movl $0x1, 0x130(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x2140
movq 0x88(%rsp), %rax
addq $0x2d8, %rsp            # imm = 0x2D8
retq
leaq 0x140(%rsp), %rdi
callq 0x2140
movq 0x138(%rsp), %rdi
callq 0x2300
nopl (%rax)