π
<-
Chat plein-écran
[^]

La NumWorks réinventée avec la N0110 - rentrée 2019

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby parisse » 25 Aug 2019, 17:35

Ci-dessous, le menu modifie pour le portage de giac: apps/math_toolbox.cpp
Code: Select all
#include "math_toolbox.h"
#include "./shared/toolbox_helpers.h"
#include <assert.h>
#include <string.h>

using namespace Poincare;

/* We create one model tree: each node keeps the label of the row it refers to
* and the text which would be edited by clicking on the row. When the node is a
* subtree, the edited text is set at I18n::Message::Default. */

const ToolboxMessageTree calculChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::DiffCommandWithArg, I18n::Message::DerivateNumber, false, I18n::Message::DiffCommand),
  ToolboxMessageTree::Leaf(I18n::Message::IntCommandWithArg, I18n::Message::Integral, false, I18n::Message::IntCommand),
  ToolboxMessageTree::Leaf(I18n::Message::LimitCommandWithArg, I18n::Message::LimitValue),
  ToolboxMessageTree::Leaf(I18n::Message::PtaylCommandWithArg, I18n::Message::PtaylValue),
  ToolboxMessageTree::Leaf(I18n::Message::SumCommandWithArg, I18n::Message::Sum, false, I18n::Message::SumCommand),
  ToolboxMessageTree::Leaf(I18n::Message::ProductCommandWithArg, I18n::Message::Product, false, I18n::Message::ProductCommand)
};

const ToolboxMessageTree algebraChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::NormalCommandWithArg, I18n::Message::NormalValue),
  ToolboxMessageTree::Leaf(I18n::Message::FactorCommandWithArg, I18n::Message::FactorValue),
  ToolboxMessageTree::Leaf(I18n::Message::CfactorCommandWithArg, I18n::Message::CfactorValue),
  ToolboxMessageTree::Leaf(I18n::Message::PartfracCommandWithArg, I18n::Message::PartfracDecomposition),
  ToolboxMessageTree::Leaf(I18n::Message::SimplifyCommandWithArg, I18n::Message::SimplifyValue),
};

const ToolboxMessageTree solveChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::SolveCommandWithArg, I18n::Message::SolveValue),
  ToolboxMessageTree::Leaf(I18n::Message::CsolveCommandWithArg, I18n::Message::CsolveValue),
  // ToolboxMessageTree::Leaf(I18n::Message::LinsolveCommandWithArg, I18n::Message::LinsolveValue),
  ToolboxMessageTree::Leaf(I18n::Message::DesolveCommandWithArg, I18n::Message::DesolveValue),
  // ToolboxMessageTree::Leaf(I18n::Message::RsolveCommandWithArg, I18n::Message::RsolveValue),
};

const ToolboxMessageTree realChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::AbsCommandWithArg, I18n::Message::AbsoluteValue),
  ToolboxMessageTree::Leaf(I18n::Message::RootCommandWithArg, I18n::Message::NthRoot),
  ToolboxMessageTree::Leaf(I18n::Message::LogCommandWithArg, I18n::Message::BasedLogarithm),
};

const ToolboxMessageTree complexChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::AbsCommandWithArg,I18n::Message::ComplexAbsoluteValue),
  ToolboxMessageTree::Leaf(I18n::Message::ArgCommandWithArg, I18n::Message::Agument),
  ToolboxMessageTree::Leaf(I18n::Message::ReCommandWithArg, I18n::Message::RealPart),
  ToolboxMessageTree::Leaf(I18n::Message::ImCommandWithArg, I18n::Message::ImaginaryPart),
  ToolboxMessageTree::Leaf(I18n::Message::ConjCommandWithArg, I18n::Message::Conjugate)
};

const ToolboxMessageTree probabilityChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::BinomialCommandWithArg, I18n::Message::Combination),
  ToolboxMessageTree::Leaf(I18n::Message::PermuteCommandWithArg, I18n::Message::Permutation)
};

const ToolboxMessageTree arithmeticChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::GcdCommandWithArg, I18n::Message::GreatCommonDivisor),
  ToolboxMessageTree::Leaf(I18n::Message::LcmCommandWithArg, I18n::Message::LeastCommonMultiple),
  ToolboxMessageTree::Leaf(I18n::Message::IfactorCommandWithArg, I18n::Message::PrimeFactorDecomposition),
  ToolboxMessageTree::Leaf(I18n::Message::IegcdCommandWithArg, I18n::Message::Iegcd),
  ToolboxMessageTree::Leaf(I18n::Message::RemCommandWithArg, I18n::Message::Remainder),
  ToolboxMessageTree::Leaf(I18n::Message::QuoCommandWithArg, I18n::Message::Quotient)
};

#if MATRICES_ARE_DEFINED
const ToolboxMessageTree matricesChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::MatrixCommandWithArg, I18n::Message::NewMatrix, false, I18n::Message::MatrixCommand),
  ToolboxMessageTree::Leaf(I18n::Message::IdentityCommandWithArg, I18n::Message::Identity),
  ToolboxMessageTree::Leaf(I18n::Message::RandmatrixCommandWithArg, I18n::Message::Randmatrix),
  ToolboxMessageTree::Leaf(I18n::Message::DimensionCommandWithArg, I18n::Message::Dimension),
  ToolboxMessageTree::Leaf(I18n::Message::InverseCommandWithArg, I18n::Message::Inverse),
  ToolboxMessageTree::Leaf(I18n::Message::MatpowCommandWithArg, I18n::Message::Matpow),
  ToolboxMessageTree::Leaf(I18n::Message::DeterminantCommandWithArg, I18n::Message::Determinant),
  ToolboxMessageTree::Leaf(I18n::Message::TransposeCommandWithArg, I18n::Message::Transpose),
  ToolboxMessageTree::Leaf(I18n::Message::TraceCommandWithArg, I18n::Message::Trace),
  ToolboxMessageTree::Leaf(I18n::Message::RrefCommandWithArg, I18n::Message::Rref),
  ToolboxMessageTree::Leaf(I18n::Message::KerCommandWithArg, I18n::Message::Ker),
  ToolboxMessageTree::Leaf(I18n::Message::EigenvalueCommandWithArg, I18n::Message::Eigenvalue),
  ToolboxMessageTree::Leaf(I18n::Message::EigenvectorCommandWithArg, I18n::Message::Eigenvector),
};
#endif

#if LIST_ARE_DEFINED
const ToolboxMessageTree listsChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::SortCommandWithArg, I18n::Message::Sort),
  ToolboxMessageTree::Leaf(I18n::Message::InvSortCommandWithArg, I18n::Message::InvSort),
  ToolboxMessageTree::Leaf(I18n::Message::MaxCommandWithArg, I18n::Message::Maximum),
  ToolboxMessageTree::Leaf(I18n::Message::MinCommandWithArg, I18n::Message::Minimum),
  ToolboxMessageTree::Leaf(I18n::Message::DimensionCommandWithArg, I18n::Message::Dimension)
};
#endif

const ToolboxMessageTree randomAndApproximationChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::RandomCommandWithArg, I18n::Message::RandomFloat),
  ToolboxMessageTree::Leaf(I18n::Message::RandintCommandWithArg, I18n::Message::RandomInteger),
  ToolboxMessageTree::Leaf(I18n::Message::FloorCommandWithArg, I18n::Message::Floor),
  ToolboxMessageTree::Leaf(I18n::Message::FracCommandWithArg, I18n::Message::FracPart),
  ToolboxMessageTree::Leaf(I18n::Message::CeilCommandWithArg, I18n::Message::Ceiling),
  ToolboxMessageTree::Leaf(I18n::Message::RoundCommandWithArg, I18n::Message::Rounding)};

const ToolboxMessageTree trigonometryChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::CoshCommandWithArg, I18n::Message::HyperbolicCosine),
  ToolboxMessageTree::Leaf(I18n::Message::SinhCommandWithArg, I18n::Message::HyperbolicSine),
  ToolboxMessageTree::Leaf(I18n::Message::TanhCommandWithArg, I18n::Message::HyperbolicTangent),
  ToolboxMessageTree::Leaf(I18n::Message::AcoshCommandWithArg, I18n::Message::InverseHyperbolicCosine),
  ToolboxMessageTree::Leaf(I18n::Message::AsinhCommandWithArg, I18n::Message::InverseHyperbolicSine),
  ToolboxMessageTree::Leaf(I18n::Message::AtanhCommandWithArg, I18n::Message::InverseHyperbolicTangent)};

const ToolboxMessageTree predictionChildren[] = {
  ToolboxMessageTree::Leaf(I18n::Message::Prediction95CommandWithArg, I18n::Message::Prediction95),
  ToolboxMessageTree::Leaf(I18n::Message::PredictionCommandWithArg, I18n::Message::Prediction),
  ToolboxMessageTree::Leaf(I18n::Message::ConfidenceCommandWithArg, I18n::Message::Confidence)};

const ToolboxMessageTree menu[] = {
  ToolboxMessageTree::Node(I18n::Message::RealNumber, realChildren),
  ToolboxMessageTree::Node(I18n::Message::Algebra, algebraChildren),
  ToolboxMessageTree::Node(I18n::Message::Calculation, calculChildren),
  //ToolboxMessageTree::Node(I18n::Message::Solve, solveChildren),
  ToolboxMessageTree::Node(I18n::Message::ComplexNumber, complexChildren),
  ToolboxMessageTree::Node(I18n::Message::Probability, probabilityChildren),
  ToolboxMessageTree::Node(I18n::Message::Arithmetic, arithmeticChildren),
#if MATRICES_ARE_DEFINED
  ToolboxMessageTree::Node(I18n::Message::Matrices, matricesChildren),
#endif
#if LIST_ARE_DEFINED
  ToolboxMessageTree::Node(I18n::Message::Lists,listsChildren),
#endif
  ToolboxMessageTree::Node(I18n::Message::RandomAndApproximation, randomAndApproximationChildren),
  ToolboxMessageTree::Node(I18n::Message::HyperbolicTrigonometry, trigonometryChildren),
  ToolboxMessageTree::Node(I18n::Message::Fluctuation, predictionChildren)};

const ToolboxMessageTree toolboxModel = ToolboxMessageTree::Node(I18n::Message::Toolbox, menu);

MathToolbox::MathToolbox() :
  Toolbox(nullptr, rootModel()->label())
{
}

bool MathToolbox::selectLeaf(int selectedRow) {
  ToolboxMessageTree * messageTree = (ToolboxMessageTree *)m_messageTreeModel->children(selectedRow);
  m_selectableTableView.deselectTable();

  // Translate the message
  const char * text = I18n::translate(messageTree->insertedText());
  char textToInsert[k_maxMessageSize]; // Has to be in the same scope as handleEventWithText
  if (messageTree->label() == messageTree->insertedText()) {
  //  Remove the arguments if we kept one message for both inserted and displayed message
    int maxTextToInsertLength = strlen(text) + 1;
    assert(maxTextToInsertLength <= k_maxMessageSize);
    Shared::ToolboxHelpers::TextToInsertForCommandText(text, textToInsert, maxTextToInsertLength, true);
    text = textToInsert;
  }
  sender()->handleEventWithText(text);
  Container::activeApp()->dismissModalViewController();
  return true;
}

const ToolboxMessageTree * MathToolbox::rootModel() {
  return &toolboxModel;
}

MessageTableCellWithMessage * MathToolbox::leafCellAtIndex(int index) {
  assert(index >= 0 && index < k_maxNumberOfDisplayedRows);
  return &m_leafCells[index];
}

MessageTableCellWithChevron* MathToolbox::nodeCellAtIndex(int index) {
  assert(index >= 0 && index < k_maxNumberOfDisplayedRows);
  return &m_nodeCells[index];
}

int MathToolbox::maxNumberOfDisplayedRows() {
return k_maxNumberOfDisplayedRows;
}


Et le fichier i18n partage par toutes les langues (c'est plus simple...): apps/shared_universal.i18n
Code: Select all
A = "a"
AbsCommandWithArg = "abs(x)"
AcoshCommandWithArg = "acosh(x)"
Algebra = "Algebre"
AlmostEqual = "≈"
Alpha = "alpha"
ArgCommandWithArg = "arg(z)"
AsinhCommandWithArg = "asinh(x)"
AtanhCommandWithArg = "atanh(x)"
B = "b"
BinomialCommandWithArg = "binomial(n,k)"
BlankMessage = " "
C = "c"
CapitalAlpha = "ALPHA"
CeilCommandWithArg = "ceil(x)"
CfactorCommandWithArg = "cfactor(f(x))"
CfactorValue = "Factorisation sur C"
ConfidenceCommandWithArg = "confidence(f,n)"
ConjCommandWithArg = "conj(z)"
CoshCommandWithArg = "cosh(x)"
CsolveCommandWithArg = "csolve(f(x)=0,x)"
CsolveValue = "Resoudre equation sur C"
D = "d"
DesolveCommandWithArg = "desolve(f(t,y,y'...)=0,t,y)"
DesolveValue = "Resoudre equation diff"
DeterminantCommandWithArg = "det(M)"
DiffCommandWithArg = "diff(f(x),x,a)"
DiffCommand = "diff(\x11,x,\x11)"
DimensionCommandWithArg = "dim(M)"
DiscreteLegend = "P(X="
DiscriminantFormulaDegree2 = "Δ=b^2-4ac"
E = "e"
EigenvalueCommandWithArg = "egvl(M)"
Eigenvalue = "valeurs propres"
EigenvectorCommandWithArg = "egv(M)"
Eigenvector = "vecteurs propres"
Equal = "="
FactorCommandWithArg = "factor(f(x))"
FactorValue = "Factorisation d'un polynome"
FccId = "FCC ID"
FiniteIntegralLegend = "≤X≤"
FloorCommandWithArg = "floor(x)"
FracCommandWithArg = "frac(x)"
GcdCommandWithArg = "gcd(p,q)"
ImCommandWithArg = "im(z)"
IfactorCommandWithArg = "ifactor(f(x))"
IegcdCommandWithArg = "iegcd(a,b)"
Iegcd = "Identite de Bezout a.u+b.v=d"
IdentityCommandWithArg = "identity(n)"
IntCommand = "int(\x11,x,\x11,\x11)"
IntCommandWithArg = "int(f(x),x,a,b)"
InverseCommandWithArg = "inverse(M)"
InvSortCommandWithArg = "sort>(L)"
KerCommandWithArg = "ker(M)"
Ker = "noyau d'appli. lineaire"
Lambda = "λ"
LcmCommandWithArg = "lcm(p,q)"
LeftIntegralFirstLegend = "P(X≤"
LeftIntegralSecondLegend = ")="
LimitCommandWithArg = "limit(f(x),x,a)"
LimitValue = "limite de f(x) en x=a"
LinearRegressionFormula  = " y=a·x+b "
LogCommandWithArg = "log(x,a)"
MatrixCommand = "[[\x11]]"
MatrixCommandWithArg = "[[1,2][3,4]]"
MatpowCommandWithArg = "matpow(M,n)"
Matpow = "puissance de matrice"
MaxCommandWithArg = "max(L)"
MinCommandWithArg = "min(L)"
Mu = "μ"
N = "n"
NormalCommandWithArg = "normal(f(x))"
NormalValue = "-> fraction irreductible"
P = "p"
PartfracCommandWithArg = "partfrac(f(x))"
PartfracDecomposition = "decomposition en elements simples"
PermuteCommandWithArg = "perm(n,r)"
PtaylCommandWithArg = "ptayl(f(x),x,a,n)"
PtaylValue = "Dvpt Taylor de f(x) en x=a ordre n"
Prediction95CommandWithArg = "prediction95(p,n)"
PredictionCommandWithArg = "prediction(p,n)"
ProductCommand = "product(\x11,n,\x11,\x11)"
ProductCommandWithArg = "product(f(n),n,nmin,nmax)"
QuoCommandWithArg = "iquo(p,q)"
RandintCommandWithArg = "randint(a,b)"
RandmatrixCommandWithArg = "randmatrix(n,m)"
Randmatrix = "matrice aleatoire"
RandomCommandWithArg = "random()"
RealNumber = "Reels"
ReCommandWithArg = "re(z)"
RemCommandWithArg = "irem(p,q)"
RightIntegralFirstLegend = "P("
RightIntegralSecondLegend = "≤X)="
RootCommandWithArg = "root(x,n)"
RoundCommandWithArg = "round(x,n)"
RrefCommandWithArg = "rref(M)"
Rref = "reduction forme echelonnee"
R = "r"
Shift = "shift"
Sigma = "σ"
SimplifyCommandWithArg = "simplify(f)"
SimplifyValue = "simplify expression"
SinhCommandWithArg = "sinh(x)"
Solve = "Resoudre"
SolveCommandWithArg = "solve(f(x)=0,x)"
SolveValue = "Resoudre equation"
SortCommandWithArg = "sort<(L)"
SumCommand = "sum(\x11,n,\x11,\x11)"
SumCommandWithArg = "sum(f(n),n,nmin,nmax)"
Sxy = "∑xy"
TanhCommandWithArg = "tanh(x)"
TraceCommandWithArg = "trace(M)"
TransposeCommandWithArg = "transpose(M)"
XMax = "Xmax"
XMin = "Xmin"
X = "x"
YAuto = "Y auto"
YMax = "Ymax"
YMin = "Ymin"
Y = "y"
User avatar
parisseVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 70.1%
 
Posts: 1707
Joined: 13 Dec 2013, 16:35
Gender: Not specified

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby parisse » 25 Aug 2019, 17:44

critor wrote:On parle bien de ce sujet, à date il n'y en a pas d'autre.

Voir ce que dit le texte réglementaire pour la 2ème partie; outil numérique avec tableur et Python pour certains exercices :
https://cache.media.eduscol.education.f ... 103677.pdf

D'où le fait que nous y verrons plus clair lorsque nous aurons accès à la banque de sujets avec les diverses proportions de ses composantes.

Oui, il faudra voir en pratique. Je lis a un endroit ordinateur (pour tableur ou/et Python) et un peu plus loin dans le detail des exercices environnement numerique. Je n'ai quand meme pas tellement l'impression que ca sous-entend calculatrices. Mais si c'est le cas, Numworks a interet a implementer un tableur rapidement. C'est peut-etre ce qu'ils sont en train de faire d'ailleurs, et ca pourrait expliquer au moins en partie l'augmentation de la flash de la N0110.
User avatar
parisseVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 70.1%
 
Posts: 1707
Joined: 13 Dec 2013, 16:35
Gender: Not specified

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby critor » 25 Aug 2019, 21:37

parisse wrote:Mais si c'est le cas, Numworks a interet a implementer un tableur rapidement. C'est peut-etre ce qu'ils sont en train de faire d'ailleurs, et ca pourrait expliquer au moins en partie l'augmentation de la flash de la N0110.

Ce n'est pas faute de le demander depuis 2017, pour les séries technologiques et ce qui commençait à se faire en série S, et aussi parce que ça fait tâche par rapport aux autres modèles à prix similaire et parfois même inférieur.
Image
User avatar
critorAdmin.
Niveau 18: DC (Deus ex Calculatorum)
Niveau 18: DC (Deus ex Calculatorum)
Level up: 95.2%
 
Posts: 32858
Images: 8601
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
Class: Lycée
YouTube: critor3000
Twitter: critor2000
Facebook: critor.ti

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby zardam » 26 Aug 2019, 01:30

Lionel Debroux wrote:* peut-être que l'utilisation de buster-slim comme image de base permettrait de baisser légèrement la taille de l'image de build ?


Oui effectivement, je n'ai pas forcément le réflexe, mais l'image fait toujours 1.98GB (en ajoutant aussi --no-install-recommends).

Lionel Debroux wrote:* si les commandes d'installation des packages faisaient partie du script `build`, ce script deviendrait utilisable plus largement que comme simple auxiliaire du Dockerfile, il pourrait également être utilisé seul, sur la plupart des distros Debian et dérivées. D'un autre côté, ça oblige à rendre le script idempotent et donc beaucoup plus complexe qu'avec un conteneur jetable: git clone -> if [ -d .../epsilon ]; then cd .../epsilon; git pull ...; else git clone ...; fi; et puis au moins `make clean`, et j'en passe.


C'est un peu ce que je préférerais éviter. De toute façon, sur les debian et dérivés, l'installation du nécessaire est assez simple, et ce sont certainement des utilisateurs déjà relativement avancés. C'est un peu ce qui me gêne aussi avec la solution docker Elle est "entre deux", vu qu'elle nécessite déjà d'avoir un linux installé. Le plus gros avantage reste quand même la reproductibilité du build, l'environnement étant maîtrisé (d'ailleurs j'ai des soucis avec le gcc 8 fourni par ARM).

parisse wrote:Je pense que ce serait une bonne idee de mettre une traduction en francais du mode d'emploi, pour cibler un peu plus large.

Oui effectivement. Il faudrait aussi que j'ajoute un paragraphe sur l'installation de docker certainement pour être complet.

Sinon, j'ai mis à jour l'image docker, et pushé les modifications de giac/epsilon sur la branche n110-giac de mon fork. Je n'ai pas encore intégré les dernières modifications par contre (demain certainement).

En tout cas, pour tester tout ça il suffit de faire un
Code: Select all
$ docker run -it --rm --privileged zardam/epsilon-builder https://github.com/zardam/epsilon.git n110-giac
User avatar
zardamPremium
Niveau 9: IC (Compteur Infatigable)
Niveau 9: IC (Compteur Infatigable)
Level up: 7.2%
 
Posts: 163
Images: 13
Joined: 11 Oct 2017, 23:39
Gender: Not specified
Calculator(s):

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby parisse » 26 Aug 2019, 06:41

Super! Mais je ne peux pas tester pour le moment, pas assez d'Internet!
User avatar
parisseVIP++
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 70.1%
 
Posts: 1707
Joined: 13 Dec 2013, 16:35
Gender: Not specified

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby stevetuc » 06 Sep 2019, 14:23

critor wrote:
stevetuc wrote:Were the benchmarks run on hp prime using native PPL or python syntax in the cas?
This choice will have a big impact on the speed I imagine. Could the codes used be posted?


On the HP Prime, Python syntax is usually slightly faster than HPPPL, because the same program is shorter
(less lines, since in Python syntax you don't have to close loops or blocks)
.
In the CAS context you need to use floats instead of integers, to prevent CAS from interfering and slowing down things.


I ask because in the article it states, the script is encoded in the historical programming language of each model.
So eg the case of the TI-83 Premium CE, is it TI-Basic or Python? Its mentioned in another post that TI-Basic was used here.
In the case of the Prime, Python syntax in the Cas has been used, but it should perhaps be pointed out that if HPPPL (ie non Cas) had been used (agreed not Python compatable but instead the historical programming language of the Prime), the benchmark would likely run several x faster and the G2 would outperform the Numworks N110 in this specific case.
User avatar
stevetuc
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Level up: 0%
 
Posts: 5
Joined: 06 Apr 2015, 10:05
Gender: Not specified

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby critor » 06 Sep 2019, 15:29

Where did I write I used Python syntax on the HP Prime ?

I'm sorry but the benchmarks were perfectly fair for the HP Prime.

It's true that I did test on the HP Prime with both HPPPL and Python syntaxes, and in both non-CAS and CAS contexts.
But the time reported in the 1st post for the HP Prime is the one for the faster setup : HPPPL-non-CAS.
It wouldn't have been fair to test the HP Prime in the slower CAS context and then comparing it to non-CAS models.

To sum up things on the HP Prime :
  • HPPPL non-CAS is usually slightly faster than HPPPL-CAS
  • Python-CAS is usually slightly faster than HPPPL-CAS
Image
User avatar
critorAdmin.
Niveau 18: DC (Deus ex Calculatorum)
Niveau 18: DC (Deus ex Calculatorum)
Level up: 95.2%
 
Posts: 32858
Images: 8601
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
Class: Lycée
YouTube: critor3000
Twitter: critor2000
Facebook: critor.ti

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby stevetuc » 06 Sep 2019, 16:14

critor wrote:Here is the Python script for the HP Prime :
Code: Select all
#CAS
def hastime():
  try:
    monotonic()
    return True
  except:
    return False

def seuil(d=.001):
  timed,n=hastime(),0
  start,stop,u=0 or timed and monotonic(),1,2.
  d=d**2
  while (u-1)**2>=d:
    u=1+(1/((1-u)*(n+1)))
    n=n+1
  return [(timed and monotonic() or 1)-start,n,u]
#end


This was the code posted in response to my question about the code used in the benchmark.
But if the time reported in the 1st post for the HP Prime is the one for the faster setup : HPPPL-non-CAS. Perhaps you would be able to share that code?
User avatar
stevetuc
Niveau 0: MI (Membre Inactif)
Niveau 0: MI (Membre Inactif)
Level up: 0%
 
Posts: 5
Joined: 06 Apr 2015, 10:05
Gender: Not specified

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby critor » 06 Sep 2019, 16:25

Thanks.

One of the 3 codes used on the HP Prime for this test then, sorry for not being clear enough.
I prefer using Python syntax in my posts since it is more well-known
(and since I'm dealing with different calculators and languages)
.

But there is nothing special with the HPPPL version. I'm checking if it's still on my calculator.
Image
User avatar
critorAdmin.
Niveau 18: DC (Deus ex Calculatorum)
Niveau 18: DC (Deus ex Calculatorum)
Level up: 95.2%
 
Posts: 32858
Images: 8601
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
Class: Lycée
YouTube: critor3000
Twitter: critor2000
Facebook: critor.ti

Re: La NumWorks réinventée avec la N0110 - rentrée 2019

Unread postby critor » 06 Sep 2019, 16:40

Here are the 3 HP Prime versions :

Code: Select all
EXPORT seuil(d)
BEGIN
  LOCAL n:=0;
  LOCAL u:=2.;
  d:=d^2;
  WHILE (u-1)^2≥d DO
    u:=1+(1/((1-u)*(n+1)));
    n:=n+1;
  END;
  RETURN [n,u];
END;


Code: Select all
#CAS
seuilc(d):=
begin
  local n:=0;
  local u:=2.;
  d:=d^2;
  while (u-1)^2≥d do
    u:=1+(1/((1-u)*(n+1)));
    n:=n+1;
  end;
  return [n,u];
end;
#end


Code: Select all
#CAS
def hastime():
  try:
    monotonic()
    return True
  except:
    return False

def seuilp(d=.008):
  timed,n=hastime(),0
  start,stop,u=0 or timed and monotonic(),1,2.
  d=d**2
  while (u-1)**2>=d:
    u=1+(1/((1-u)*(n+1)))
    n=n+1
  return [(timed and monotonic() or 1)-start,n,u]
#end
Image
User avatar
critorAdmin.
Niveau 18: DC (Deus ex Calculatorum)
Niveau 18: DC (Deus ex Calculatorum)
Level up: 95.2%
 
Posts: 32858
Images: 8601
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
Class: Lycée
YouTube: critor3000
Twitter: critor2000
Facebook: critor.ti

PreviousNext

Return to News NumWorks

Who is online

Users browsing this forum: No registered users and 2 guests

-
Search
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
1
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...

Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety 
-
Stats.
440 utilisateurs:
>422 invités
>13 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)