{"id":513,"date":"2024-08-10T19:01:00","date_gmt":"2024-08-10T17:01:00","guid":{"rendered":"https:\/\/honadi.com\/outils\/?page_id=513"},"modified":"2024-09-26T10:43:49","modified_gmt":"2024-09-26T08:43:49","slug":"calculatrice-scientifique","status":"publish","type":"page","link":"https:\/\/honadi.com\/outils\/calculatrice-scientifique\/","title":{"rendered":"Calculatrice scientifique"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"513\" class=\"elementor elementor-513\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5e8ac2b e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"5e8ac2b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d71bebe elementor-widget elementor-widget-html\" data-id=\"d71bebe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\n    #calculatrice-container {\n        font-family: Arial, sans-serif;\n        max-width: 320px;\n        margin: 0 auto;\n    }\n    #kore {\n        width: 100%;\n        border: none;\n        border-radius: 10px;\n        background-color: #f0f0f0;\n        padding: 20px;\n        box-shadow: 0 4px 8px rgba(0,0,0,0.1);\n    }\n    #kore1 {\n        width: 100%;\n        text-align: right;\n        height: 60px;\n        border: none;\n        border-radius: 5px;\n        background-color: #ffffff;\n        color: #333;\n        font-size: 24px;\n        margin-bottom: 10px;\n        padding: 0 10px;\n        box-sizing: border-box;\n    }\n    #kore input[type=\"button\"] {\n        width: 100%;\n        height: 50px;\n        border: none;\n        border-radius: 5px;\n        background-color: #e0e0e0;\n        color: #333;\n        font-size: 16px;\n        cursor: pointer;\n        transition: background-color 0.3s;\n    }\n    #kore input[type=\"button\"]:hover {\n        background-color: #d0d0d0;\n    }\n    #kore td {\n        padding: 4px;\n    }\n    #kore input[type=\"button\"].operator {\n        background-color: #ff9500;\n        color: white;\n    }\n    #kore input[type=\"button\"].operator:hover {\n        background-color: #e68600;\n    }\n    #kore input[type=\"button\"].function {\n        background-color: #a5a5a5;\n        color: white;\n    }\n    #kore input[type=\"button\"].function:hover {\n        background-color: #929292;\n    }\n    #kore input[type=\"button\"].memory {\n        background-color: #4a4a4a;\n        color: white;\n    }\n    #kore input[type=\"button\"].memory:hover {\n        background-color: #3a3a3a;\n    }\n<\/style>\n\n<div id=\"calculatrice-container\">\n    <table id=\"kore\">\n        <tr>\n            <td colspan=\"5\">\n                <input type=\"text\" value=\"\" id=\"kore1\" placeholder=\"0\" readonly \/>\n            <\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" class=\"memory\" value=\"MC\" onclick=\"memoryC()\" \/><\/td>\n            <td><input type=\"button\" class=\"memory\" value=\"MR\" onclick=\"memoryR()\" \/><\/td>\n            <td><input type=\"button\" class=\"memory\" value=\"M+\" onclick=\"memoryP()\" \/><\/td>\n            <td><input type=\"button\" class=\"memory\" value=\"M-\" onclick=\"memoryM()\" \/><\/td>\n            <td><input type=\"button\" class=\"memory\" value=\"MS\" onclick=\"memoryS()\" \/><\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" class=\"function\" value=\"(\" onclick=\"tchad1(this)\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\")\" onclick=\"tchad1(this)\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"&larr;\" onclick=\"cleanonebyone()\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"C\" onclick=\"effacer()\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"AC\" onclick=\"effacerTout()\" \/><\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" class=\"function\" value=\"x\u00b2\" onclick=\"carre()\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"\u221a\" onclick=\"racine()\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"log\" onclick=\"log()\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"exp\" onclick=\"expo()\" \/><\/td>\n            <td><input type=\"button\" class=\"operator\" value=\"\/\" onclick=\"tchad1(this);\" \/><\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" value=\"7\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\"8\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\"9\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"%\" onclick=\"pourcentage()\" \/><\/td>\n            <td><input type=\"button\" class=\"operator\" value=\"*\" onclick=\"tchad1(this);\" \/><\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" value=\"4\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\"5\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\"6\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"1\/x\" onclick=\"inverse()\" \/><\/td>\n            <td><input type=\"button\" class=\"operator\" value=\"-\" onclick=\"tchad1(this);\" \/><\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" value=\"1\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\"2\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\"3\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" class=\"function\" value=\"&plusmn;\" onclick=\"tchad2();\" \/><\/td>\n            <td><input type=\"button\" class=\"operator\" value=\"+\" onclick=\"tchad1(this);\" \/><\/td>\n        <\/tr>\n        <tr>\n            <td><input type=\"button\" class=\"function\" value=\"\u03c0\" onclick=\"pi();\" \/><\/td>\n            <td><input type=\"button\" value=\"0\" onclick=\"tchad1(this);\" \/><\/td>\n            <td><input type=\"button\" value=\".\" onclick=\"decimal('.');\" \/><\/td>\n            <td colspan=\"2\"><input type=\"button\" class=\"operator\" value=\"=\" onclick=\"resultat();\" \/><\/td>\n        <\/tr>\n    <\/table>\n<\/div>\n\n<script>\n    let memoire = 0;\n\n    function tchad1(x) {\n        var ko = x.value;\n        var ecran = document.getElementById(\"kore1\");\n        ecran.value += ko;\n    }\n\n    function resultat() {\n        ecran = document.getElementById(\"kore1\");\n        try {\n            ecran.value = eval(ecran.value);\n        } catch (e) {\n            ecran.value = \"Erreur\";\n        }\n    }\n\n    function effacer() {\n        document.getElementById(\"kore1\").value = \"\";\n    }\n\n    function effacerTout() {\n        document.getElementById(\"kore1\").value = \"\";\n        memoire = 0;\n    }\n\n    function racine() {\n        ecran = document.getElementById(\"kore1\");\n        var resultat = Math.sqrt(parseFloat(ecran.value));\n        ecran.value = isNaN(resultat) ? \"Erreur\" : resultat;\n    }\n\n    function decimal(x) {\n        ecran = document.getElementById(\"kore1\");\n        if (!ecran.value.includes('.')) {\n            ecran.value += x;\n        }\n    }\n\n    function pourcentage() {\n        ecran = document.getElementById(\"kore1\");\n        ecran.value = parseFloat(ecran.value) \/ 100;\n    }\n\n    function tchad2() {\n        ecran = document.getElementById(\"kore1\");\n        ecran.value = -parseFloat(ecran.value);\n    }\n\n    function cleanonebyone() {\n        var ecran = document.getElementById(\"kore1\");\n        ecran.value = ecran.value.slice(0, -1);\n    }\n\n    function carre() {\n        ecran = document.getElementById(\"kore1\");\n        ecran.value = Math.pow(parseFloat(ecran.value), 2);\n    }\n\n    function inverse() {\n        ecran = document.getElementById(\"kore1\");\n        ecran.value = 1 \/ parseFloat(ecran.value);\n    }\n\n    function log() {\n        ecran = document.getElementById(\"kore1\");\n        var resultat = Math.log(parseFloat(ecran.value));\n        ecran.value = isNaN(resultat) ? \"Erreur\" : resultat;\n    }\n\n    function expo() {\n        ecran = document.getElementById(\"kore1\");\n        var resultat = Math.exp(parseFloat(ecran.value));\n        ecran.value = isNaN(resultat) ? \"Erreur\" : resultat;\n    }\n\n    function pi() {\n        document.getElementById(\"kore1\").value += Math.PI;\n    }\n\n    function memoryC() {\n        memoire = 0;\n    }\n\n    function memoryR() {\n        document.getElementById(\"kore1\").value = memoire;\n    }\n\n    function memoryP() {\n        memoire += parseFloat(document.getElementById(\"kore1\").value);\n    }\n\n    function memoryM() {\n        memoire -= parseFloat(document.getElementById(\"kore1\").value);\n    }\n\n    function memoryS() {\n        memoire = parseFloat(document.getElementById(\"kore1\").value);\n    }\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":2534,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-513","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/pages\/513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/comments?post=513"}],"version-history":[{"count":7,"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/pages\/513\/revisions"}],"predecessor-version":[{"id":524,"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/pages\/513\/revisions\/524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/media\/2534"}],"wp:attachment":[{"href":"https:\/\/honadi.com\/outils\/wp-json\/wp\/v2\/media?parent=513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}