{"id":353,"date":"2013-02-08T10:51:58","date_gmt":"2013-02-08T18:51:58","guid":{"rendered":"http:\/\/www.dereviankogroup.com\/?p=353"},"modified":"2013-02-13T11:41:49","modified_gmt":"2013-02-13T19:41:49","slug":"tweaking-mathematica-output-for-order-of-magnitude-estimates","status":"publish","type":"post","link":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/","title":{"rendered":"Tweaking Mathematica output for order-of-magnitude estimates"},"content":{"rendered":"<p>Here is a trick I find useful when quickly estimating order-of magnitude values of various quantities \u00a0in Mathematica. The statements below force the format of all numerical output to be in the scientific notation (x 10^y).<\/p>\n<p>oldPost = $Post;<br \/>\nformat[x_Real] :=<br \/>\nNumberForm[x, ExponentFunction -&gt; (If[-1 &lt; # &lt; 1, Null, #] &amp;)];<br \/>\nformat[x_] := x;<br \/>\n$Post = format;<\/p>\n<p>When you execute these statements, the output\u00a0formatting\u00a0will persist for the rest of the mmka session. If you want to go back to the default output format in the session, execute<\/p>\n<p>$Post = oldPost;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here is a trick I find useful when quickly estimating order-of magnitude values of various quantities \u00a0in Mathematica. The statements below force the format of all numerical output to be in the scientific notation (x 10^y). oldPost = $Post; format[x_Real] := NumberForm[x, ExponentFunction -&gt; (If[-1 &lt; # &lt; 1, Null, #] &amp;)]; format[x_] := x; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[18,12],"tags":[17],"class_list":["post-353","post","type-post","status-publish","format-standard","hentry","category-mathematica-2","category-physics","tag-mathematica"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Tweaking Mathematica output for order-of-magnitude estimates - Derevianko Group<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Tweaking Mathematica output for order-of-magnitude estimates - Derevianko Group\" \/>\n<meta property=\"og:description\" content=\"Here is a trick I find useful when quickly estimating order-of magnitude values of various quantities \u00a0in Mathematica. The statements below force the format of all numerical output to be in the scientific notation (x 10^y). oldPost = $Post; format[x_Real] := NumberForm[x, ExponentFunction -&gt; (If[-1 &lt; # &lt; 1, Null, #] &amp;)]; format[x_] := x; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/\" \/>\n<meta property=\"og:site_name\" content=\"Derevianko Group\" \/>\n<meta property=\"article:published_time\" content=\"2013-02-08T18:51:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-02-13T19:41:49+00:00\" \/>\n<meta name=\"author\" content=\"Andrei Derevianko\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrei Derevianko\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/\"},\"author\":{\"name\":\"Andrei Derevianko\",\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/#\\\/schema\\\/person\\\/1b1937b0e53a2496fbd701dec5ccb395\"},\"headline\":\"Tweaking Mathematica output for order-of-magnitude estimates\",\"datePublished\":\"2013-02-08T18:51:58+00:00\",\"dateModified\":\"2013-02-13T19:41:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/\"},\"wordCount\":97,\"commentCount\":0,\"keywords\":[\"Mathematica\"],\"articleSection\":[\"mathematica\",\"physics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/\",\"url\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/\",\"name\":\"Tweaking Mathematica output for order-of-magnitude estimates - Derevianko Group\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/#website\"},\"datePublished\":\"2013-02-08T18:51:58+00:00\",\"dateModified\":\"2013-02-13T19:41:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/#\\\/schema\\\/person\\\/1b1937b0e53a2496fbd701dec5ccb395\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/tweaking-mathematica-output-for-order-of-magnitude-estimates\\\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/#website\",\"url\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/\",\"name\":\"Derevianko Group\",\"description\":\"The home of theoretical physics group and GPS.DM observatory at the University of Nevada, Reno\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/#\\\/schema\\\/person\\\/1b1937b0e53a2496fbd701dec5ccb395\",\"name\":\"Andrei Derevianko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9f71afbad6c6444e8740e4d22973afec881f20396e22be1b91974391e9e3e7cc?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9f71afbad6c6444e8740e4d22973afec881f20396e22be1b91974391e9e3e7cc?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9f71afbad6c6444e8740e4d22973afec881f20396e22be1b91974391e9e3e7cc?s=96&r=g\",\"caption\":\"Andrei Derevianko\"},\"url\":\"https:\\\/\\\/www.dereviankogroup.com\\\/dereviankogroup\\\/rightthere\\\/author\\\/apd117dg\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Tweaking Mathematica output for order-of-magnitude estimates - Derevianko Group","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/","og_locale":"en_US","og_type":"article","og_title":"Tweaking Mathematica output for order-of-magnitude estimates - Derevianko Group","og_description":"Here is a trick I find useful when quickly estimating order-of magnitude values of various quantities \u00a0in Mathematica. The statements below force the format of all numerical output to be in the scientific notation (x 10^y). oldPost = $Post; format[x_Real] := NumberForm[x, ExponentFunction -&gt; (If[-1 &lt; # &lt; 1, Null, #] &amp;)]; format[x_] := x; [&hellip;]","og_url":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/","og_site_name":"Derevianko Group","article_published_time":"2013-02-08T18:51:58+00:00","article_modified_time":"2013-02-13T19:41:49+00:00","author":"Andrei Derevianko","twitter_misc":{"Written by":"Andrei Derevianko"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/#article","isPartOf":{"@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/"},"author":{"name":"Andrei Derevianko","@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/#\/schema\/person\/1b1937b0e53a2496fbd701dec5ccb395"},"headline":"Tweaking Mathematica output for order-of-magnitude estimates","datePublished":"2013-02-08T18:51:58+00:00","dateModified":"2013-02-13T19:41:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/"},"wordCount":97,"commentCount":0,"keywords":["Mathematica"],"articleSection":["mathematica","physics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/","url":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/","name":"Tweaking Mathematica output for order-of-magnitude estimates - Derevianko Group","isPartOf":{"@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/#website"},"datePublished":"2013-02-08T18:51:58+00:00","dateModified":"2013-02-13T19:41:49+00:00","author":{"@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/#\/schema\/person\/1b1937b0e53a2496fbd701dec5ccb395"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/tweaking-mathematica-output-for-order-of-magnitude-estimates\/"]}]},{"@type":"WebSite","@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/#website","url":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/","name":"Derevianko Group","description":"The home of theoretical physics group and GPS.DM observatory at the University of Nevada, Reno","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/#\/schema\/person\/1b1937b0e53a2496fbd701dec5ccb395","name":"Andrei Derevianko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9f71afbad6c6444e8740e4d22973afec881f20396e22be1b91974391e9e3e7cc?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9f71afbad6c6444e8740e4d22973afec881f20396e22be1b91974391e9e3e7cc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9f71afbad6c6444e8740e4d22973afec881f20396e22be1b91974391e9e3e7cc?s=96&r=g","caption":"Andrei Derevianko"},"url":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/author\/apd117dg\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Z9xm-5H","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/posts\/353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/comments?post=353"}],"version-history":[{"count":39,"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/posts\/353\/revisions"}],"predecessor-version":[{"id":392,"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/posts\/353\/revisions\/392"}],"wp:attachment":[{"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/media?parent=353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/categories?post=353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dereviankogroup.com\/dereviankogroup\/rightthere\/wp-json\/wp\/v2\/tags?post=353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}