Skip to main content
Commonmark migration
Source Link

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

 

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

 

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

added 2 characters in body; edited tags
Source Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand, because in MathematicaMathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

added 57 characters in body
Source Link
Ruslan
  • 7.3k
  • 2
  • 24
  • 54

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand. How can I stop NIntegrate from suppressing the messages?

Consider the following code:

test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 

5.33333333333334

I.e. it gives me the result, suppressing all messages emitted by test. OTOH, this code does emit the messages:

N@Sum[test[x] 1/1000, {x, 0, 3, 1/1000}] 

Test::message: -- Message text not found --
Test::message: -- Message text not found --
Test::message: -- Message text not found --
General::stop: Further output of Test::message will be suppressed during this calculation.

5.3338335

I'd really like to receive the messages from the integrand, because in Mathematica 11 they allow to see stack trace. How can I stop NIntegrate from suppressing the messages?

Tweeted twitter.com/StackMma/status/870599587228266496
edited tags
Link
Alexey Popkov
  • 62.5k
  • 7
  • 163
  • 405
Loading
edited title
Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263
Loading
edited tags
Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263
Loading
Source Link
Ruslan
  • 7.3k
  • 2
  • 24
  • 54
Loading