Merge pull request #601 from steveicarus/verireal-dead-code
Remove some dead code
This commit is contained in:
commit
922a2e0e13
27
verireal.cc
27
verireal.cc
|
|
@ -66,9 +66,9 @@ verireal::~verireal()
|
|||
{
|
||||
}
|
||||
|
||||
long verireal::as_long(int shift) const
|
||||
long verireal::as_long() const
|
||||
{
|
||||
double out = value_ * pow(10.0,shift);
|
||||
double out = value_;
|
||||
double outf;
|
||||
|
||||
if (out >= 0.0) {
|
||||
|
|
@ -133,13 +133,6 @@ verireal operator/ (const verireal&l, const verireal&r)
|
|||
return res;
|
||||
}
|
||||
|
||||
verireal operator/ (const verireal&l, const verinum&r)
|
||||
{
|
||||
verireal res;
|
||||
res.value_ = l.value_ / (double)r.as_long();
|
||||
return res;
|
||||
}
|
||||
|
||||
verireal operator% (const verireal&l, const verireal&r)
|
||||
{
|
||||
verireal res;
|
||||
|
|
@ -151,22 +144,6 @@ verireal operator% (const verireal&l, const verireal&r)
|
|||
return res;
|
||||
}
|
||||
|
||||
verireal operator% (const verireal&l, const verinum&r)
|
||||
{
|
||||
verireal res;
|
||||
// See above.
|
||||
assert(gn_icarus_misc_flag);
|
||||
res.value_ = fmod(l.value_, (double)r.as_long());
|
||||
return res;
|
||||
}
|
||||
|
||||
verireal pow (const verireal&l, const verireal&r)
|
||||
{
|
||||
verireal res;
|
||||
res.value_ = pow(l.value_, r.value_);
|
||||
return res;
|
||||
}
|
||||
|
||||
verireal operator- (const verireal&l)
|
||||
{
|
||||
verireal res;
|
||||
|
|
|
|||
18
verireal.h
18
verireal.h
|
|
@ -42,10 +42,7 @@ class verireal {
|
|||
friend verireal operator- (const verireal&, const verireal&);
|
||||
friend verireal operator* (const verireal&, const verireal&);
|
||||
friend verireal operator/ (const verireal&, const verireal&);
|
||||
friend verireal operator/ (const verireal&, const verinum&);
|
||||
friend verireal operator% (const verireal&, const verireal&);
|
||||
friend verireal operator% (const verireal&, const verinum&);
|
||||
friend verireal pow(const verireal&, const verireal&);
|
||||
|
||||
// Unary minus.
|
||||
friend verireal operator- (const verireal&);
|
||||
|
|
@ -57,12 +54,12 @@ class verireal {
|
|||
explicit verireal(double val);
|
||||
~verireal();
|
||||
|
||||
/* Return the value of the floating point number as an
|
||||
integer, rounded as needed. The shift is the power of 10 to
|
||||
multiply the value before calculating the result. So for
|
||||
example if the value is 2.5 and shift == 1, the result
|
||||
is 25. */
|
||||
long as_long(int shift =0) const;
|
||||
// Return the value of the floating point number as an
|
||||
// integer, rounded as needed. The shift is the power of 10 to
|
||||
// multiply the value before calculating the result. So for
|
||||
// example if the value is 2.5 and shift == 1, the result
|
||||
// is 25.
|
||||
long as_long() const;
|
||||
int64_t as_long64(int shift =0) const;
|
||||
|
||||
double as_double() const;
|
||||
|
|
@ -74,10 +71,7 @@ class verireal {
|
|||
extern std::ostream& operator<< (std::ostream&, const verireal&);
|
||||
extern verireal operator* (const verireal&, const verireal&);
|
||||
extern verireal operator/ (const verireal&, const verireal&);
|
||||
extern verireal operator/ (const verireal&, const verinum&);
|
||||
extern verireal operator% (const verireal&, const verireal&);
|
||||
extern verireal operator% (const verireal&, const verinum&);
|
||||
extern verireal pow(const verireal&, const verireal&);
|
||||
extern verireal operator- (const verireal&);
|
||||
|
||||
#endif /* IVL_verireal_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue