Arithmetic operations on Quantities with special units should return null
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 50/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript
- Área
- backend
Línea de trabajo
Start by locating the implementations of Add, Divide, Modulo, Multiply, Subtract, and Truncated Divide, then read how the project represents and validates UCUM units. Add or find tests for arithmetic involving offset and logarithmic special units, including the Fahrenheit/Celsius examples in the issue. Done means these operations return null for invalid or special units instead of producing meaningless quantities or throwing errors.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In the definitions of the following arithmetic operators, the spec says "Attempting to operate on quantities with invalid or special units will result in a null. "
The term "special units" isn't defined in CQL itself so I believe it refers to the UCUM "special units" https://ucum.org/ucum#section-Special-Units-on-non-ratio-Scales which includes things like temperature scales with offsets, and logarithmic scales like pH, dB, etc.
Currently, we don't do anything different for "special" units in these operations, so we can get meaningless results:
define "SpecialUnitsTest": 10 '[degF]' + 2 'Cel'
-->
45.6 '[degF]'
or throw errors:
define "SpecialUnitsTest": 10 '[degF]' * 2 'Cel'
(throws when trying to construct a Quantity with units [degF]2)
- Lenguaje dominante
- JavaScript
- Estrellas
- 85
- Forks
- 40
- Merge medio
- 5 d 4 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de cqframework/cql-execution
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
cqframework/cql-execution#400 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
cqframework/cql-execution#398 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
cqframework/cql-execution#397 ·
-
Issue with using type testing operation on FHIR primitivesPosiblemente ocupada @dehall la tomó hace 16 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 54/100
cqframework/cql-execution#391 · 2 comentarios · 1 asignado ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
cqframework/cql-execution#390 · 1 comentario ·
Todos los issues de cqframework/cql-execution
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
postcss/postcss.org#302 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ImranR98/apps.obtainium.imranr.dev#2000 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
microsoft/monaco-editor#5577 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Ebony-Vinyl/dsh-our-free-model#785 ·
Los mantenedores suelen responder en 1 día