SHORT-TERM AND LONG-TERM DEBT (Details 3) - USD ($) $ in Thousands |
Apr. 30, 2017 |
Oct. 31, 2016 |
|---|---|---|
| Debt Instrument [Line Items] | ||
| Net Carrying Amount | $ 393,377 | $ 486,303 |
| 0.875% Convertible Senior Notes due June 15, 2017 | Convertible notes payable | ||
| Debt Instrument [Line Items] | ||
| Principal Balance | 185,258 | |
| Unamortized Discount | 0 | |
| Deferred Debt Issuance Costs | (37) | |
| Net Carrying Amount | 185,221 | |
| Equity component, Net carrying amount | 0 | |
| 3.75% Convertible Senior Notes due October 15, 2018 | Convertible notes payable | ||
| Debt Instrument [Line Items] | ||
| Principal Balance | 350,000 | |
| Unamortized Discount | 0 | |
| Deferred Debt Issuance Costs | (1,752) | |
| Net Carrying Amount | 348,248 | |
| Equity component, Net carrying amount | 0 | |
| 4.0% Convertible Senior Notes due December 15, 2020 | Convertible notes payable | ||
| Debt Instrument [Line Items] | ||
| Principal Balance | 203,093 | |
| Unamortized Discount | (10,428) | |
| Deferred Debt Issuance Costs | (1,108) | |
| Net Carrying Amount | 191,557 | |
| Equity component, Net carrying amount | $ 43,131 |